Package org.apache.http.protocol
Class BasicHttpProcessor
java.lang.Object
org.apache.http.protocol.BasicHttpProcessor
- All Implemented Interfaces:
Cloneable
,HttpRequestInterceptor
,HttpResponseInterceptor
,HttpProcessor
,HttpRequestInterceptorList
,HttpResponseInterceptorList
@Deprecated
public final class BasicHttpProcessor
extends Object
implements HttpProcessor, HttpRequestInterceptorList, HttpResponseInterceptorList, Cloneable
Deprecated.
(4.3)
Default implementation of
HttpProcessor
.
Please note access to the internal structures of this class is not synchronized and therefore this class may be thread-unsafe.
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addInterceptor
(HttpRequestInterceptor interceptor) Deprecated.final void
addInterceptor
(HttpRequestInterceptor interceptor, int index) Deprecated.final void
addInterceptor
(HttpResponseInterceptor interceptor) Deprecated.final void
addInterceptor
(HttpResponseInterceptor interceptor, int index) Deprecated.void
Deprecated.Appends a request interceptor to this list.void
addRequestInterceptor
(HttpRequestInterceptor itcp, int index) Deprecated.Inserts a request interceptor at the specified index.void
Deprecated.Appends a response interceptor to this list.void
addResponseInterceptor
(HttpResponseInterceptor itcp, int index) Deprecated.Inserts a response interceptor at the specified index.void
Deprecated.Clears both interceptor lists maintained by this processor.void
Deprecated.Removes all request interceptors from this list.void
Deprecated.Removes all response interceptors from this list.clone()
Deprecated.copy()
Deprecated.Creates a copy of this instancegetRequestInterceptor
(int index) Deprecated.Obtains a request interceptor from this list.int
Deprecated.Obtains the current size of this list.getResponseInterceptor
(int index) Deprecated.Obtains a response interceptor from this list.int
Deprecated.Obtains the current size of this list.void
process
(HttpRequest request, HttpContext context) Deprecated.Processes a request.void
process
(HttpResponse response, HttpContext context) Deprecated.Processes a response.void
removeRequestInterceptorByClass
(Class<? extends HttpRequestInterceptor> clazz) Deprecated.Removes all request interceptor of the specified classvoid
removeResponseInterceptorByClass
(Class<? extends HttpResponseInterceptor> clazz) Deprecated.Removes all response interceptor of the specified classvoid
setInterceptors
(List<?> list) Deprecated.Sets the interceptor lists.
-
Constructor Details
-
BasicHttpProcessor
public BasicHttpProcessor()Deprecated.
-
-
Method Details
-
addRequestInterceptor
Deprecated.Description copied from interface:HttpRequestInterceptorList
Appends a request interceptor to this list.- Specified by:
addRequestInterceptor
in interfaceHttpRequestInterceptorList
- Parameters:
itcp
- the request interceptor to add
-
addRequestInterceptor
Deprecated.Description copied from interface:HttpRequestInterceptorList
Inserts a request interceptor at the specified index.- Specified by:
addRequestInterceptor
in interfaceHttpRequestInterceptorList
- Parameters:
itcp
- the request interceptor to addindex
- the index to insert the interceptor at
-
addResponseInterceptor
Deprecated.Description copied from interface:HttpResponseInterceptorList
Inserts a response interceptor at the specified index.- Specified by:
addResponseInterceptor
in interfaceHttpResponseInterceptorList
- Parameters:
itcp
- the response interceptor to addindex
- the index to insert the interceptor at
-
removeRequestInterceptorByClass
Deprecated.Description copied from interface:HttpRequestInterceptorList
Removes all request interceptor of the specified class- Specified by:
removeRequestInterceptorByClass
in interfaceHttpRequestInterceptorList
- Parameters:
clazz
- the class of the instances to be removed.
-
removeResponseInterceptorByClass
Deprecated.Description copied from interface:HttpResponseInterceptorList
Removes all response interceptor of the specified class- Specified by:
removeResponseInterceptorByClass
in interfaceHttpResponseInterceptorList
- Parameters:
clazz
- the class of the instances to be removed.
-
addInterceptor
Deprecated. -
addInterceptor
Deprecated. -
getRequestInterceptorCount
public int getRequestInterceptorCount()Deprecated.Description copied from interface:HttpRequestInterceptorList
Obtains the current size of this list.- Specified by:
getRequestInterceptorCount
in interfaceHttpRequestInterceptorList
- Returns:
- the number of request interceptors in this list
-
getRequestInterceptor
Deprecated.Description copied from interface:HttpRequestInterceptorList
Obtains a request interceptor from this list.- Specified by:
getRequestInterceptor
in interfaceHttpRequestInterceptorList
- Parameters:
index
- the index of the interceptor to obtain, 0 for first- Returns:
- the interceptor at the given index, or
null
if the index is out of range
-
clearRequestInterceptors
public void clearRequestInterceptors()Deprecated.Description copied from interface:HttpRequestInterceptorList
Removes all request interceptors from this list.- Specified by:
clearRequestInterceptors
in interfaceHttpRequestInterceptorList
-
addResponseInterceptor
Deprecated.Description copied from interface:HttpResponseInterceptorList
Appends a response interceptor to this list.- Specified by:
addResponseInterceptor
in interfaceHttpResponseInterceptorList
- Parameters:
itcp
- the response interceptor to add
-
addInterceptor
Deprecated. -
addInterceptor
Deprecated. -
getResponseInterceptorCount
public int getResponseInterceptorCount()Deprecated.Description copied from interface:HttpResponseInterceptorList
Obtains the current size of this list.- Specified by:
getResponseInterceptorCount
in interfaceHttpResponseInterceptorList
- Returns:
- the number of response interceptors in this list
-
getResponseInterceptor
Deprecated.Description copied from interface:HttpResponseInterceptorList
Obtains a response interceptor from this list.- Specified by:
getResponseInterceptor
in interfaceHttpResponseInterceptorList
- Parameters:
index
- the index of the interceptor to obtain, 0 for first- Returns:
- the interceptor at the given index, or
null
if the index is out of range
-
clearResponseInterceptors
public void clearResponseInterceptors()Deprecated.Description copied from interface:HttpResponseInterceptorList
Removes all response interceptors from this list.- Specified by:
clearResponseInterceptors
in interfaceHttpResponseInterceptorList
-
setInterceptors
Deprecated.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.- Specified by:
setInterceptors
in interfaceHttpRequestInterceptorList
- Specified by:
setInterceptors
in interfaceHttpResponseInterceptorList
- Parameters:
list
- the list of request and response interceptors from which to initialize
-
clearInterceptors
public void clearInterceptors()Deprecated.Clears both interceptor lists maintained by this processor. -
process
Deprecated.Description copied from interface:HttpRequestInterceptor
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.- Specified by:
process
in interfaceHttpRequestInterceptor
- Parameters:
request
- the request to preprocesscontext
- the context for the request- Throws:
IOException
- in case of an I/O errorHttpException
- in case of an HTTP protocol violation
-
process
Deprecated.Description copied from interface:HttpResponseInterceptor
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.- Specified by:
process
in interfaceHttpResponseInterceptor
- Parameters:
response
- the response to postprocesscontext
- the context for the request- Throws:
IOException
- in case of an I/O errorHttpException
- in case of an HTTP protocol violation
-
copy
Deprecated.Creates a copy of this instance- Returns:
- new instance of the BasicHttpProcessor
-
clone
Deprecated.- Throws:
CloneNotSupportedException
-