Class H2AsyncRequester
java.lang.Object
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:
Closeable,AutoCloseable,ModalCloseable,ConnPoolControl<HttpHost>,ConnPoolStats<HttpHost>,ConnectionInitiator,IOReactor,IOReactorService
Client side message exchange initiator capable of negotiating
HTTP/2 or HTTP/1.1 compatible connections.
- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionH2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost, IOSession> connPool, TlsStrategy tlsStrategy, Timeout handshakeTimeout, IOReactorMetricsListener threadPoolListener, IOWorkerSelector workerSelector, int maxPendingCommandsPerConnection) UseH2RequesterBootstrapto create instances of this class. -
Method Summary
Modifier and TypeMethodDescriptionconnect(NamedEndpoint arg0, SocketAddress arg1, SocketAddress arg2, Timeout arg3, Object arg4, FutureCallback<IOSession> arg5) protected Future<AsyncClientEndpoint>doConnect(HttpHost host, Timeout timeout, 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, execute, execute, execute, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getRoutes, getStats, getTotalStats, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotalMethods inherited from class org.apache.hc.core5.http.impl.bootstrap.AsyncRequester
awaitShutdown, close, close, defaultTarget, getStatus, initiateShutdown, requestSession, start
-
Constructor Details
-
H2AsyncRequester
@Internal public H2AsyncRequester(HttpVersionPolicy versionPolicy, IOReactorConfig ioReactorConfig, IOEventHandlerFactory eventHandlerFactory, Decorator<IOSession> ioSessionDecorator, Callback<Exception> exceptionCallback, IOSessionListener sessionListener, ManagedConnPool<HttpHost, IOSession> connPool, TlsStrategy tlsStrategy, Timeout handshakeTimeout, IOReactorMetricsListener threadPoolListener, IOWorkerSelector workerSelector, int maxPendingCommandsPerConnection) UseH2RequesterBootstrapto create instances of this class.
-
-
Method Details
-
doConnect
protected Future<AsyncClientEndpoint> doConnect(HttpHost host, Timeout timeout, Object attachment, FutureCallback<AsyncClientEndpoint> callback) - Overrides:
doConnectin classHttpAsyncRequester
-
doTlsUpgrade
protected void doTlsUpgrade(ProtocolIOSession ioSession, NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback) - Overrides:
doTlsUpgradein classHttpAsyncRequester
-
connect
public final Future<IOSession> connect(NamedEndpoint arg0, SocketAddress arg1, SocketAddress arg2, Timeout arg3, Object arg4, FutureCallback<IOSession> arg5) - Specified by:
connectin interfaceConnectionInitiator
-