Class H2AsyncRequester
- java.lang.Object
-
- org.apache.hc.core5.http.impl.bootstrap.AbstractConnectionInitiatorBase
-
- org.apache.hc.core5.http.impl.bootstrap.AsyncRequester
-
- org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester
-
- org.apache.hc.core5.http2.impl.nio.bootstrap.H2AsyncRequester
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ModalCloseable,ConnPoolControl<HttpHost>,ConnPoolStats<HttpHost>,ConnectionInitiator,IOReactor,IOReactorService
public class H2AsyncRequester extends HttpAsyncRequester
Client side message exchange initiator capable of negotiating HTTP/2 or HTTP/1.1 compatible connections.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private HttpVersionPolicyversionPolicy
-
Constructor Summary
Constructors Constructor Description H2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost,IOSession> connPool)UseH2RequesterBootstrapto create instances of this class.H2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost,IOSession> connPool, TlsStrategy tlsStrategy, Timeout handshakeTimeout)UseH2RequesterBootstrapto create instances of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.concurrent.Future<AsyncClientEndpoint>doConnect(HttpHost host, Timeout timeout, java.lang.Object attachment, FutureCallback<AsyncClientEndpoint> callback)protected voiddoTlsUpgrade(ProtocolIOSession ioSession, NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback)-
Methods inherited from class org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester
closeExpired, closeIdle, connect, connect, execute, execute, execute, execute, execute, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getRoutes, getStats, getTotalStats, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal
-
Methods inherited from class org.apache.hc.core5.http.impl.bootstrap.AsyncRequester
awaitShutdown, close, close, getStatus, initiateShutdown, requestSession, start
-
Methods inherited from class org.apache.hc.core5.http.impl.bootstrap.AbstractConnectionInitiatorBase
connect
-
-
-
-
Field Detail
-
versionPolicy
private final HttpVersionPolicy versionPolicy
-
-
Constructor Detail
-
H2AsyncRequester
@Internal public H2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost,IOSession> connPool)
UseH2RequesterBootstrapto create instances of this class.
-
H2AsyncRequester
@Internal public H2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<java.lang.Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost,IOSession> connPool, TlsStrategy tlsStrategy, Timeout handshakeTimeout)
UseH2RequesterBootstrapto create instances of this class.- Since:
- 5.2
-
-
Method Detail
-
doConnect
protected java.util.concurrent.Future<AsyncClientEndpoint> doConnect(HttpHost host, Timeout timeout, java.lang.Object attachment, FutureCallback<AsyncClientEndpoint> callback)
- Overrides:
doConnectin classHttpAsyncRequester
-
doTlsUpgrade
protected void doTlsUpgrade(ProtocolIOSession ioSession, NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback)
- Overrides:
doTlsUpgradein classHttpAsyncRequester
-
-