java.lang.Object | |
↳ | org.apache.http.protocol.BasicHttpProcessor |
Keeps lists of interceptors for processing requests and responses.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
requestInterceptors | |||||||||||
responseInterceptors |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Same as addRequestInterceptor.
| |||||||||||
Same as addResponseInterceptor.
| |||||||||||
Inserts a request interceptor at the specified index.
| |||||||||||
Appends a request interceptor to this list.
| |||||||||||
Inserts a response interceptor at the specified index.
| |||||||||||
Appends a response interceptor to this list.
| |||||||||||
Clears both interceptor lists maintained by this processor.
| |||||||||||
Removes all request interceptors from this list.
| |||||||||||
Removes all response interceptors from this list.
| |||||||||||
Creates and returns a copy of this
Object . | |||||||||||
Creates a copy of this instance
| |||||||||||
Obtains a request interceptor from this list.
| |||||||||||
Obtains the current size of this list.
| |||||||||||
Obtains a response interceptor from this list.
| |||||||||||
Obtains the current size of this list.
| |||||||||||
Processes a request.
| |||||||||||
Processes a response.
| |||||||||||
Removes all request interceptor of the specified class
| |||||||||||
Removes all response interceptor of the specified class
| |||||||||||
Sets the interceptor lists.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface org.apache.http.HttpRequestInterceptor
| |||||||||||
From interface org.apache.http.HttpResponseInterceptor
| |||||||||||
From interface org.apache.http.protocol.HttpRequestInterceptorList
| |||||||||||
From interface org.apache.http.protocol.HttpResponseInterceptorList
|
Same as addRequestInterceptor.
interceptor | the interceptor to add |
---|
Same as addResponseInterceptor.
interceptor | the interceptor to add |
---|
Inserts a request interceptor at the specified index.
itcp | the request interceptor to add |
---|---|
index | the index to insert the interceptor at |
Appends a request interceptor to this list.
itcp | the request interceptor to add |
---|
Inserts a response interceptor at the specified index.
itcp | the response interceptor to add |
---|---|
index | the index to insert the interceptor at |
Appends a response interceptor to this list.
itcp | the response interceptor to add |
---|
Clears both interceptor lists maintained by this processor.
Removes all request interceptors from this list.
Removes all response interceptors from this list.
Creates and returns a copy of this Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.
CloneNotSupportedException |
---|
Creates a copy of this instance
Obtains a request interceptor from this list.
index | the index of the interceptor to obtain, 0 for first |
---|
null
if the index is out of range
Obtains the current size of this list.
Obtains a response interceptor from this list.
index | the index of the interceptor to obtain, 0 for first |
---|
null
if the index is out of range
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.
request | the request to preprocess |
---|---|
context | the context for the request |
IOException | |
---|---|
HttpException |
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.
response | the response to postprocess |
---|---|
context | the context for the request |
IOException | |
---|---|
HttpException |
Removes all request interceptor of the specified class
clazz | the class of the instances to be removed. |
---|
Removes all response interceptor of the specified class
clazz | the class of the instances to be removed. |
---|
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.
list | the list of request and response interceptors from which to initialize |
---|