org.apache.jcs.auxiliary.remote.http.client
Class AbstractHttpClient

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.http.client.AbstractHttpClient
Direct Known Subclasses:
RemoteHttpCacheDispatcher

public abstract class AbstractHttpClient
extends Object

This class simply configures the http multithreaded connection manager.

This is abstract because it can't do anything. Child classes can overwrite whatever they want.


Constructor Summary
AbstractHttpClient(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
          Sets the default Properties File and Heading, and creates the HttpClient and connection manager.
 
Method Summary
 void configureClient()
          Configures the http client.
protected  void doWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
          Extracted method that can be overwritten to do additional things to the post before the call is made.
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager getConnectionManager()
           
 RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
           
abstract  void postProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post, org.apache.commons.httpclient.HttpState httpState)
          Called after the executeMethod on the client.
abstract  org.apache.commons.httpclient.HttpState preProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
          Called before the executeMethod on the client.
 void setConnectionManager(org.apache.commons.httpclient.MultiThreadedHttpConnectionManager connectionManager)
           
 void setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpClient

public AbstractHttpClient(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
Sets the default Properties File and Heading, and creates the HttpClient and connection manager.

Parameters:
remoteHttpCacheAttributes -
Method Detail

configureClient

public void configureClient()
Configures the http client.


doWebserviceCall

protected final void doWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
                               throws IOException
Extracted method that can be overwritten to do additional things to the post before the call is made.

Parameters:
post - the post that is about to get executed.
Throws:
IOException - on i/o error

preProcessWebserviceCall

public abstract org.apache.commons.httpclient.HttpState preProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post)
                                                                          throws IOException
Called before the executeMethod on the client.

Parameters:
post - http method
Returns:
HttpState
Throws:
IOException

postProcessWebserviceCall

public abstract void postProcessWebserviceCall(org.apache.commons.httpclient.HttpMethod post,
                                               org.apache.commons.httpclient.HttpState httpState)
                                        throws IOException
Called after the executeMethod on the client.

Parameters:
post - http method
httpState - state
Throws:
IOException

getConnectionManager

public org.apache.commons.httpclient.MultiThreadedHttpConnectionManager getConnectionManager()
Returns:
Returns the connectionManager.

setConnectionManager

public void setConnectionManager(org.apache.commons.httpclient.MultiThreadedHttpConnectionManager connectionManager)
Parameters:
connectionManager - The connectionManager to set.

setRemoteHttpCacheAttributes

public void setRemoteHttpCacheAttributes(RemoteHttpCacheAttributes remoteHttpCacheAttributes)
Parameters:
remoteHttpCacheAttributes - the remoteHttpCacheAttributes to set

getRemoteHttpCacheAttributes

public RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
Returns:
the remoteHttpCacheAttributes


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.