Class AbstractHttpClient

java.lang.Object
org.apache.commons.jcs3.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 do anything. Child classes can overwrite whatever they want.

  • Constructor Details

    • AbstractHttpClient

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

      Parameters:
      remoteHttpCacheAttributes -
  • Method Details

    • configureClient

      protected void configureClient(org.apache.http.impl.client.HttpClientBuilder builder)
      Configures the http client.
      Parameters:
      builder - client builder to configure
    • doWebserviceCall

      protected final org.apache.http.HttpResponse doWebserviceCall(org.apache.http.client.methods.RequestBuilder builder) throws IOException
      Execute the web service call

      Parameters:
      builder - builder for the post request
      Returns:
      the call response
      Throws:
      IOException - on i/o error
    • preProcessWebserviceCall

      protected abstract void preProcessWebserviceCall(org.apache.http.client.methods.RequestBuilder requestBuilder) throws IOException
      Called before the execute call on the client.

      Parameters:
      requestBuilder - http method request builder
      Throws:
      IOException
    • postProcessWebserviceCall

      protected abstract void postProcessWebserviceCall(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.HttpResponse httpState) throws IOException
      Called after the execute call on the client.

      Parameters:
      request - http request
      httpState - result of execution
      Throws:
      IOException
    • getRemoteHttpCacheAttributes

      Returns:
      the remoteHttpCacheAttributes