public class ApacheHttpClientWrapper extends java.lang.Object implements HttpClientWrapper, org.crac.Resource
HttpClientWrapper.ExecuteEventHandler, HttpClientWrapper.Request, HttpClientWrapper.Verb| Constructor and Description |
|---|
ApacheHttpClientWrapper(ApacheProxyManager proxyManager,
javax.net.ssl.SSLContext sslContext,
int defaultTimeoutInMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterRestore(org.crac.Context<? extends org.crac.Resource> context) |
void |
beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context) |
void |
captureSupportabilityMetrics(StatsService statsService,
java.lang.String requestHost) |
ReadResult |
execute(HttpClientWrapper.Request request,
HttpClientWrapper.ExecuteEventHandler handler)
Executes a request, mapping the response body and status code.
|
void |
shutdown() |
public ApacheHttpClientWrapper(ApacheProxyManager proxyManager, javax.net.ssl.SSLContext sslContext, int defaultTimeoutInMillis)
public void shutdown()
shutdown in interface HttpClientWrapperpublic void captureSupportabilityMetrics(StatsService statsService, java.lang.String requestHost)
captureSupportabilityMetrics in interface HttpClientWrapperpublic ReadResult execute(HttpClientWrapper.Request request, HttpClientWrapper.ExecuteEventHandler handler) throws java.lang.Exception
HttpClientWrapperexecute in interface HttpClientWrapperrequest - The POJO representing the request.handler - A handler (may be null) to receive events when the request starts and returns control.java.lang.Exception - For anything that didn't result in a standard http response with a status code and body.public void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context)
throws java.lang.Exception
beforeCheckpoint in interface org.crac.Resourcejava.lang.Exceptionpublic void afterRestore(org.crac.Context<? extends org.crac.Resource> context)
throws java.lang.Exception
afterRestore in interface org.crac.Resourcejava.lang.Exception