Package org.apache.http
Interface HttpRequestInterceptor
-
- All Known Subinterfaces:
HttpProcessor
- All Known Implementing Classes:
BasicHttpProcessor
,ImmutableHttpProcessor
,RequestAcceptEncoding
,RequestAddCookies
,RequestAuthCache
,RequestClientConnControl
,RequestConnControl
,RequestContent
,RequestDate
,RequestDefaultHeaders
,RequestExpectContinue
,RequestExpectContinue
,RequestProxyAuthentication
,RequestTargetAuthentication
,RequestTargetHost
,RequestUserAgent
public interface HttpRequestInterceptor
HTTP protocol interceptor is a routine that implements a specific aspect of the HTTP protocol. Usually protocol interceptors are expected to act upon one specific header or a group of related headers of the incoming message or populate the outgoing message with one specific header or a group of related headers.Protocol Interceptors can also manipulate content entities enclosed with messages. Usually this is accomplished by using the 'Decorator' pattern where a wrapper entity class is used to decorate the original entity.
Protocol interceptors must be implemented as thread-safe. Similarly to servlets, protocol interceptors should not use instance variables unless access to those variables is synchronized.
- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
process(HttpRequest request, HttpContext context)
Processes a request.
-
-
-
Method Detail
-
process
void process(HttpRequest request, HttpContext context) throws HttpException, java.io.IOException
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.- Parameters:
request
- the request to preprocesscontext
- the context for the request- Throws:
HttpException
- in case of an HTTP protocol violationjava.io.IOException
- in case of an I/O error
-
-