Package org.apache.hc.core5.testing.nio
Class HttpTestClient
java.lang.Object
org.apache.hc.core5.testing.nio.AsyncRequester
org.apache.hc.core5.testing.nio.HttpTestClient
- All Implemented Interfaces:
AutoCloseable,ConnectionInitiator
- Direct Known Subclasses:
H2TestClient,Http1TestClient
- Since:
- 5.4
-
Constructor Summary
ConstructorsConstructorDescriptionHttpTestClient(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitShutdown(TimeValue waitTime) voidclose()voidconfigure(HttpProcessor httpProcessor) connect(HttpHost host, Timeout timeout, FutureCallback<ClientSessionEndpoint> callback) protected voidexecute(IOEventHandlerFactory ioEventHandlerFactory) voidvoidabstract voidstart()voidstartExecution(IOEventHandlerFactory handlerFactory) Methods inherited from class org.apache.hc.core5.testing.nio.AsyncRequester
connect, requestSession
-
Constructor Details
-
HttpTestClient
public HttpTestClient(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) throws IOException - Throws:
IOException
-
HttpTestClient
- Throws:
IOException
-
-
Method Details
-
start
- Throws:
Exception
-
configure
-
connect
public Future<ClientSessionEndpoint> connect(HttpHost host, Timeout timeout, FutureCallback<ClientSessionEndpoint> callback) -
connect
-
connect
-
startExecution
- Throws:
IOException
-
execute
- Throws:
IOException
-
getStatus
-
awaitShutdown
- Throws:
InterruptedException
-
initiateShutdown
public void initiateShutdown() -
shutdown
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-