Class H2MultiplexingRequester
- java.lang.Object
-
- org.apache.hc.core5.http.impl.bootstrap.AsyncRequester
-
- org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequester
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.io.ModalCloseable,org.apache.hc.core5.reactor.ConnectionInitiator,org.apache.hc.core5.reactor.IOReactor,org.apache.hc.core5.reactor.IOReactorService
public class H2MultiplexingRequester extends org.apache.hc.core5.http.impl.bootstrap.AsyncRequesterHTTP/2 multiplexing client side message exchange initiator.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description H2MultiplexingRequester(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.reactor.IOSession> ioSessionDecorator, org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback, org.apache.hc.core5.reactor.IOSessionListener sessionListener, org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,java.net.InetSocketAddress> addressResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy, org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener, org.apache.hc.core5.reactor.IOWorkerSelector workerSelector, java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.util.TimeValue> validateAfterInactivityRef, int maxCommandsPerConnection)UseH2MultiplexingRequesterBootstrapto create instances of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcloseIdle(org.apache.hc.core5.util.TimeValue idleTime)Deprecated.This method has no effect as of version 5.5 and should not be used.java.util.concurrent.Future<org.apache.hc.core5.reactor.IOSession>connect(org.apache.hc.core5.net.NamedEndpoint arg0, java.net.SocketAddress arg1, java.net.SocketAddress arg2, org.apache.hc.core5.util.Timeout arg3, java.lang.Object arg4, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> arg5)voidevictExpired()Evict expired (closed) connections.org.apache.hc.core5.concurrent.Cancellableexecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)org.apache.hc.core5.concurrent.Cancellableexecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)<T> java.util.concurrent.Future<T>execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)<T> java.util.concurrent.Future<T>execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)org.apache.hc.core5.concurrent.Cancellableexecute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)org.apache.hc.core5.concurrent.Cancellableexecute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)<T> java.util.concurrent.Future<T>execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)<T> java.util.concurrent.Future<T>execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<T> callback)<T> java.util.concurrent.Future<T>execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)H2ConnPoolgetConnPool()java.util.Set<org.apache.hc.core5.http.HttpHost>getRoutes()org.apache.hc.core5.util.TimeValuegetValidateAfterInactivity()voidsetValidateAfterInactivity(org.apache.hc.core5.util.TimeValue timeValue)
-
-
-
Constructor Detail
-
H2MultiplexingRequester
@Internal public H2MultiplexingRequester(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, org.apache.hc.core5.reactor.IOEventHandlerFactory eventHandlerFactory, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.reactor.IOSession> ioSessionDecorator, org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback, org.apache.hc.core5.reactor.IOSessionListener sessionListener, org.apache.hc.core5.function.Resolver<org.apache.hc.core5.http.HttpHost,java.net.InetSocketAddress> addressResolver, org.apache.hc.core5.http.nio.ssl.TlsStrategy tlsStrategy, org.apache.hc.core5.reactor.IOReactorMetricsListener threadPoolListener, org.apache.hc.core5.reactor.IOWorkerSelector workerSelector, java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.util.TimeValue> validateAfterInactivityRef, int maxCommandsPerConnection)UseH2MultiplexingRequesterBootstrapto create instances of this class.
-
-
Method Detail
-
closeIdle
@Deprecated public void closeIdle(org.apache.hc.core5.util.TimeValue idleTime)
Deprecated.This method has no effect as of version 5.5 and should not be used. Use the connection level socket timeout to ensure idle connections time out and get gracefully terminated. Expired connections can be proactively evicted from the pool withevictExpired().This method has no effect. Its initial implementation has been removed, as it can cause termination of sessions with multiplexing message exchange such as HTTP/2.- See Also:
evictExpired()
-
evictExpired
public void evictExpired()
Evict expired (closed) connections.- Since:
- 5.5
-
getRoutes
public java.util.Set<org.apache.hc.core5.http.HttpHost> getRoutes()
-
getValidateAfterInactivity
public org.apache.hc.core5.util.TimeValue getValidateAfterInactivity()
-
setValidateAfterInactivity
public void setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue timeValue)
-
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)- Since:
- 5.3
-
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)
-
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)- Since:
- 5.3
-
execute
public org.apache.hc.core5.concurrent.Cancellable execute(org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context)
-
execute
public final <T> java.util.concurrent.Future<T> execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)- Type Parameters:
T- The result type returned by the Future'sgetmethod.- Since:
- 5.3
-
execute
public final <T> java.util.concurrent.Future<T> execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
-
execute
public final <T> java.util.concurrent.Future<T> execute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)- Type Parameters:
T- The result type returned by the Future'sgetmethod.- Since:
- 5.3
-
execute
public final <T> java.util.concurrent.Future<T> execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
-
execute
public final <T> java.util.concurrent.Future<T> execute(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
-
getConnPool
@Internal public H2ConnPool getConnPool()
-
connect
public final java.util.concurrent.Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint arg0, java.net.SocketAddress arg1, java.net.SocketAddress arg2, org.apache.hc.core5.util.Timeout arg3, java.lang.Object arg4, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> arg5)- Specified by:
connectin interfaceorg.apache.hc.core5.reactor.ConnectionInitiator
-
-