public class RemoteHttpCacheDispatcher extends AbstractHttpClient implements IRemoteCacheDispatcher
| Constructor and Description |
|---|
RemoteHttpCacheDispatcher(RemoteHttpCacheAttributes remoteHttpCacheAttributes) |
| Modifier and Type | Method and Description |
|---|---|
protected <K,V> String |
addParameters(RemoteCacheRequest<K,V> remoteCacheRequest,
String baseUrl) |
<K,V,T> RemoteCacheResponse<T> |
dispatchRequest(RemoteCacheRequest<K,V> remoteCacheRequest)
All requests will go through this method.
|
protected void |
postProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post,
org.apache.commons.httpclient.HttpState httpState)
Called after the executeMethod on the client.
|
protected org.apache.commons.httpclient.HttpState |
preProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
Called before the executeMethod on the client.
|
protected byte[] |
processRequest(byte[] requestAsByteArray,
String url) |
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 byte[] processRequest(byte[] requestAsByteArray,
String url)
throws IOException,
org.apache.commons.httpclient.HttpException
requestAsByteArray - url - IOExceptionorg.apache.commons.httpclient.HttpExceptionprotected <K,V> String addParameters(RemoteCacheRequest<K,V> remoteCacheRequest, String baseUrl)
remoteCacheRequest - baseUrl - protected org.apache.commons.httpclient.HttpState preProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
throws IOException
preProcessWebserviceCall in class AbstractHttpClientpost - http methodIOExceptionprotected void postProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post,
org.apache.commons.httpclient.HttpState httpState)
throws IOException
postProcessWebserviceCall in class AbstractHttpClientpost - http methodhttpState - stateIOExceptionCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.