Class HttpTestClient
java.lang.Object
org.apache.hc.core5.testing.nio.AsyncRequester
org.apache.hc.core5.testing.nio.HttpTestClient
- All Implemented Interfaces:
AutoCloseable, org.apache.hc.core5.reactor.ConnectionInitiator
- Direct Known Subclasses:
H2TestClient, Http1TestClient
- Since:
- 5.4
-
Constructor Summary
ConstructorsConstructorDescriptionHttpTestClient(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer sslSessionInitializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier sslSessionVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) voidclose()voidconfigure(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor) connect(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout) connect(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<ClientSessionEndpoint> callback) protected voidexecute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) org.apache.hc.core5.reactor.IOReactorStatusvoidvoidshutdown(org.apache.hc.core5.util.TimeValue graceTime) abstract voidstart()voidstartExecution(org.apache.hc.core5.reactor.IOEventHandlerFactory handlerFactory) Methods inherited from class AsyncRequester
connect, requestSession
-
Constructor Details
-
HttpTestClient
public HttpTestClient(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer sslSessionInitializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier sslSessionVerifier) throws IOException - Throws:
IOException
-
HttpTestClient
- Throws:
IOException
-
-
Method Details
-
start
-
configure
public void configure(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor) -
connect
public Future<ClientSessionEndpoint> connect(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<ClientSessionEndpoint> callback) -
connect
public Future<ClientSessionEndpoint> connect(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout) -
connect
public Future<ClientSessionEndpoint> connect(String hostname, int port, org.apache.hc.core5.util.Timeout timeout) -
startExecution
public void startExecution(org.apache.hc.core5.reactor.IOEventHandlerFactory handlerFactory) throws IOException - Throws:
IOException
-
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
-