Package io.airlift.http.client.testing
Class TestingHttpClient
- java.lang.Object
-
- io.airlift.http.client.testing.TestingHttpClient
-
- All Implemented Interfaces:
HttpClient,Closeable,AutoCloseable
public class TestingHttpClient extends Object implements HttpClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTestingHttpClient.Processor-
Nested classes/interfaces inherited from interface io.airlift.http.client.HttpClient
HttpClient.HttpResponseFuture<T>
-
-
Constructor Summary
Constructors Constructor Description TestingHttpClient(TestingHttpClient.Processor processor)TestingHttpClient(TestingHttpClient.Processor processor, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<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)longgetMaxContentLength()RequestStatsgetStats()booleanisClosed()
-
-
-
Constructor Detail
-
TestingHttpClient
public TestingHttpClient(TestingHttpClient.Processor processor)
-
TestingHttpClient
public TestingHttpClient(TestingHttpClient.Processor processor, ExecutorService executor)
-
-
Method Detail
-
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 extends Exception
- Specified by:
executein interfaceHttpClient- Throws:
E extends Exception
-
getStats
public RequestStats 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
-
-