Package io.airlift.http.client.testing
Class TestingHttpClient
java.lang.Object
io.airlift.http.client.testing.TestingHttpClient
- All Implemented Interfaces:
HttpClient,Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.airlift.http.client.HttpClient
HttpClient.HttpResponseFuture<T> -
Constructor Summary
ConstructorsConstructorDescriptionTestingHttpClient(TestingHttpClient.Processor processor) TestingHttpClient(TestingHttpClient.Processor processor, ExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T,E extends Exception>
Texecute(Request request, ResponseHandler<T, E> responseHandler) <T,E extends Exception>
HttpClient.HttpResponseFuture<T>executeAsync(Request request, ResponseHandler<T, E> responseHandler) longgetStats()booleanisClosed()
-
Constructor Details
-
TestingHttpClient
-
TestingHttpClient
-
-
Method Details
-
executeAsync
public <T,E extends Exception> HttpClient.HttpResponseFuture<T> executeAsync(Request request, ResponseHandler<T, E> responseHandler) - Specified by:
executeAsyncin interfaceHttpClient
-
execute
public <T,E extends Exception> T execute(Request request, ResponseHandler<T, E> responseHandler) throws E- Specified by:
executein interfaceHttpClient- Throws:
E extends Exception
-
getStats
- Specified by:
getStatsin interfaceHttpClient
-
getMaxContentLength
public long getMaxContentLength()- Specified by:
getMaxContentLengthin interfaceHttpClient
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpClient
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceHttpClient
-