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, getRemoteHttpCacheAttributes
public 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 IRemoteCacheDispatcher
remoteCacheRequest
- IOException
protected byte[] processRequest(byte[] requestAsByteArray, String url) throws IOException, org.apache.commons.httpclient.HttpException
requestAsByteArray
- url
- IOException
org.apache.commons.httpclient.HttpException
protected <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 AbstractHttpClient
post
- http methodIOException
protected void postProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post, org.apache.commons.httpclient.HttpState httpState) throws IOException
postProcessWebserviceCall
in class AbstractHttpClient
post
- http methodhttpState
- stateIOException
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.