Class RemoteHttpCacheDispatcher
java.lang.Object
org.apache.commons.jcs3.auxiliary.remote.http.client.AbstractHttpClient
org.apache.commons.jcs3.auxiliary.remote.http.client.RemoteHttpCacheDispatcher
- All Implemented Interfaces:
- IRemoteCacheDispatcher
Calls the service.
- 
Constructor SummaryConstructorsConstructorDescriptionRemoteHttpCacheDispatcher(RemoteHttpCacheAttributes remoteHttpCacheAttributes) 
- 
Method SummaryModifier and TypeMethodDescription<K,V, T> RemoteCacheResponse<T> dispatchRequest(RemoteCacheRequest<K, V> remoteCacheRequest) All requests will go through this method.protected voidpostProcessWebserviceCall(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.HttpResponse httpState) Called after the execute call on the client.protected voidpreProcessWebserviceCall(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 requestMethods inherited from class org.apache.commons.jcs3.auxiliary.remote.http.client.AbstractHttpClientconfigureClient, doWebserviceCall, getRemoteHttpCacheAttributes
- 
Constructor Details- 
RemoteHttpCacheDispatcher- Parameters:
- remoteHttpCacheAttributes-
 
 
- 
- 
Method Details- 
dispatchRequestpublic <K,V, RemoteCacheResponse<T> dispatchRequestT> (RemoteCacheRequest<K, V> remoteCacheRequest) throws IOExceptionAll requests will go through this method.TODO consider taking in a URL instead of using the one in the configuration. - Specified by:
- dispatchRequestin interface- IRemoteCacheDispatcher
- Parameters:
- remoteCacheRequest-
- Returns:
- RemoteCacheResponse
- Throws:
- IOException
 
- 
processRequestprotected <K,V> byte[] processRequest(byte[] requestAsByteArray, RemoteCacheRequest<K, V> remoteCacheRequest, String url) throws IOException, org.apache.http.HttpExceptionProcess single request- Parameters:
- requestAsByteArray- request body
- remoteCacheRequest- the cache request
- url- target url
- Returns:
- byte[] - the response
- Throws:
- IOException
- org.apache.http.HttpException
 
- 
preProcessWebserviceCallprotected void preProcessWebserviceCall(org.apache.http.client.methods.RequestBuilder requestBuilder) throws IOException Called before the execute call on the client.- Specified by:
- preProcessWebserviceCallin class- AbstractHttpClient
- Parameters:
- requestBuilder- http method request builder
- Throws:
- IOException
 
- 
postProcessWebserviceCallprotected void postProcessWebserviceCall(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.HttpResponse httpState) throws IOException Called after the execute call on the client.- Specified by:
- postProcessWebserviceCallin class- AbstractHttpClient
- Parameters:
- request- http request
- httpState- result of execution
- Throws:
- IOException
 
 
-