Class AsyncRequester
java.lang.Object
org.apache.hc.core5.testing.nio.AsyncRequester
- All Implemented Interfaces:
AutoCloseable, org.apache.hc.core5.reactor.ConnectionInitiator
- Direct Known Subclasses:
HttpTestClient
public class AsyncRequester
extends Object
implements org.apache.hc.core5.reactor.ConnectionInitiator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) voidclose()Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, org.apache.hc.core5.util.Timeout timeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback) protected voidexecute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) org.apache.hc.core5.reactor.IOReactorStatusvoidFuture<org.apache.hc.core5.reactor.IOSession> requestSession(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback) voidshutdown(org.apache.hc.core5.util.TimeValue graceTime)
-
Constructor Details
-
AsyncRequester
public AsyncRequester(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig)
-
-
Method Details
-
requestSession
public Future<org.apache.hc.core5.reactor.IOSession> requestSession(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback) -
connect
public Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, org.apache.hc.core5.util.Timeout timeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback) - Specified by:
connectin interfaceorg.apache.hc.core5.reactor.ConnectionInitiator
-
execute
protected void execute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) throws IOException - Throws:
IOException
-
getStatus
public org.apache.hc.core5.reactor.IOReactorStatus getStatus() -
awaitShutdown
- Throws:
InterruptedException
-
initiateShutdown
public void initiateShutdown() -
shutdown
public void shutdown(org.apache.hc.core5.util.TimeValue graceTime) -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-