org.apache.http.protocol.BasicHttpProcessor
Keeps lists of interceptors for processing requests and responses.
Summary
Fields
Public Constructors
Public Methods
Protected Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Fields
protected
List
requestInterceptors
protected
List
responseInterceptors
Public Constructors
public
BasicHttpProcessor()
Public Methods
public
void
addRequestInterceptor(HttpRequestInterceptor itcp, int index)
Inserts a request interceptor at the specified index.
Appends a request interceptor to this list.
public
void
addResponseInterceptor(HttpResponseInterceptor itcp, int index)
Inserts a response interceptor at the specified index.
Appends a response interceptor to this list.
public
void
clearInterceptors()
Clears both interceptor lists maintained by this processor.
public
void
clearRequestInterceptors()
Removes all request interceptors from this list.
public
void
clearResponseInterceptors()
Removes all response interceptors from this list.
public
Object
clone()
Returns a new instance of the same class as the receiver, whose slots
have been filled in with the values in the slots of the receiver.
Classes which wish to support cloning must specify that they implement
the Cloneable interface, since the implementation checks for this.
Returns
- Object a shallow copy of this object.
Creates a copy of this instance
Returns
- new instance of the BasicHttpProcessor
Obtains a request interceptor from this list.
public
int
getRequestInterceptorCount()
Obtains the current size of this list.
Obtains a response interceptor from this list.
public
int
getResponseInterceptorCount()
Obtains the current size of this list.
Processes a request.
On the client side, this step is performed before the request is
sent to the server. On the server side, this step is performed
on incoming messages before the message body is evaluated.
Processes a response.
On the server side, this step is performed before the response is
sent to the client. On the client side, this step is performed
on incoming messages before the message body is evaluated.
public
void
removeRequestInterceptorByClass(Class clazz)
Removes all request interceptor of the specified class
public
void
removeResponseInterceptorByClass(Class clazz)
Removes all response interceptor of the specified class
public
void
setInterceptors(List list)
Sets the interceptor lists.
First, both interceptor lists maintained by this processor
will be cleared.
Subsequently,
elements of the argument list that are request interceptors will be
added to the request interceptor list.
Elements that are response interceptors will be
added to the response interceptor list.
Elements that are both request and response interceptor will be
added to both lists.
Elements that are neither request nor response interceptor
will be ignored.
Parameters
list
| the list of request and response interceptors
from which to initialize
|
Protected Methods