Spring Framework

org.springframework.http.client
Class AbstractClientHttpRequestFactoryWrapper

java.lang.Object
  extended by org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper
All Implemented Interfaces:
ClientHttpRequestFactory
Direct Known Subclasses:
BufferingClientHttpRequestFactory, InterceptingClientHttpRequestFactory

public abstract class AbstractClientHttpRequestFactoryWrapper
extends java.lang.Object
implements ClientHttpRequestFactory

Abstract base class for ClientHttpRequestFactory implementations that decorate another request factory.

Since:
3.1
Author:
Arjen Poutsma

Constructor Summary
protected AbstractClientHttpRequestFactoryWrapper(ClientHttpRequestFactory requestFactory)
          Creates a AbstractClientHttpRequestFactoryWrapper wrapping the given request factory.
 
Method Summary
 ClientHttpRequest createRequest(java.net.URI uri, HttpMethod httpMethod)
          This implementation simply calls createRequest(URI, HttpMethod, ClientHttpRequestFactory) with the wrapped request factory provided to the constructor.
protected abstract  ClientHttpRequest createRequest(java.net.URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
          Create a new ClientHttpRequest for the specified URI and HTTP method by using the passed-on request factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractClientHttpRequestFactoryWrapper

protected AbstractClientHttpRequestFactoryWrapper(ClientHttpRequestFactory requestFactory)
Creates a AbstractClientHttpRequestFactoryWrapper wrapping the given request factory.

Parameters:
requestFactory - the request factory to be wrapped
Method Detail

createRequest

public final ClientHttpRequest createRequest(java.net.URI uri,
                                             HttpMethod httpMethod)
                                      throws java.io.IOException
This implementation simply calls createRequest(URI, HttpMethod, ClientHttpRequestFactory) with the wrapped request factory provided to the constructor.

Specified by:
createRequest in interface ClientHttpRequestFactory
Parameters:
uri - the URI to create a request for
httpMethod - the HTTP method to execute
Returns:
the created request
Throws:
java.io.IOException - in case of I/O errors

createRequest

protected abstract ClientHttpRequest createRequest(java.net.URI uri,
                                                   HttpMethod httpMethod,
                                                   ClientHttpRequestFactory requestFactory)
                                            throws java.io.IOException
Create a new ClientHttpRequest for the specified URI and HTTP method by using the passed-on request factory.

Called from createRequest(URI, HttpMethod).

Parameters:
uri - the URI to create a request for
httpMethod - the HTTP method to execute
requestFactory - the wrapped request factory
Returns:
the created request
Throws:
java.io.IOException - in case of I/O errors

Spring Framework