public class RemoteHttpCacheDispatcher extends AbstractHttpClient implements IRemoteCacheDispatcher
| Constructor and Description |
|---|
RemoteHttpCacheDispatcher(RemoteHttpCacheAttributes remoteHttpCacheAttributes) |
| Modifier and Type | Method and Description |
|---|---|
<K,V,T> RemoteCacheResponse<T> |
dispatchRequest(RemoteCacheRequest<K,V> remoteCacheRequest)
All requests will go through this method.
|
protected void |
postProcessWebserviceCall(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.HttpResponse httpState)
Called after the execute call on the client.
|
protected void |
preProcessWebserviceCall(org.apache.http.client.methods.RequestBuilder requestBuilder)
Called before the execute call on the client.
|
protected <K,V> byte[] |
processRequest(byte[] requestAsByteArray,
RemoteCacheRequest<K,V> remoteCacheRequest,
String url)
Process single request
|
configureClient, doWebserviceCall, getRemoteHttpCacheAttributespublic RemoteHttpCacheDispatcher(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
remoteHttpCacheAttributes - public <K,V,T> RemoteCacheResponse<T> dispatchRequest(RemoteCacheRequest<K,V> remoteCacheRequest) throws IOException
TODO consider taking in a URL instead of using the one in the configuration.
dispatchRequest in interface IRemoteCacheDispatcherremoteCacheRequest - IOExceptionprotected <K,V> byte[] processRequest(byte[] requestAsByteArray,
RemoteCacheRequest<K,V> remoteCacheRequest,
String url)
throws IOException,
org.apache.http.HttpException
requestAsByteArray - request bodyremoteCacheRequest - the cache requesturl - target urlIOExceptionorg.apache.http.HttpExceptionprotected void preProcessWebserviceCall(org.apache.http.client.methods.RequestBuilder requestBuilder)
throws IOException
preProcessWebserviceCall in class AbstractHttpClientrequestBuilder - http method request builderIOExceptionprotected void postProcessWebserviceCall(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.HttpResponse httpState)
throws IOException
postProcessWebserviceCall in class AbstractHttpClientrequest - http requesthttpState - result of executionIOExceptionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.