headersin the messages. In order to relieve applications from the responsibility of implementing these nitty-gritty details of the protocol, HTTP components provides an execution framework that sets up some of the headers before sending a message, and interprets headers when a message has been received.
processortypically keeps lists of so-called interceptors that will be executed before a message is sent and after it has been received. An application should initialize a processor, set up the lists with the required and desired processors, and then communicate through that processor. There are four kinds of interceptors, depending on whether they act on
responses, on the client or server side:
|Request||prepares headers before a request is sent||interprets headers when a request is received|
|Response||interprets headers when a response is received||prepares headers before a response is sent|
is a processor for the client side,
for the server side.
On the client side, a
is used to tie together a request, the response to it, and other data
that might be associated with the request execution. It is passed to
the request executor whenever needed.
Information about required and recommended interceptors for the client side will be provided elsewhere. For the time being, please refer to the comments in the example applications or ask on one of the mailing lists.
If you want to develop a server-side application, we recommend that
you implement your application as a servlet running in a servlet engine
like Tomcat or full-blown
JSEE container like Geronimo.
If you prefer to implement a server-side application based on our
assume that you know what you're doing and that you don't need
help in figuring out which interceptors need to be configured.
|HttpContext||A context for executing a request.|
|HttpExpectationVerifier||Defines an interface to verify whether an incoming HTTP request meets the target server's expectations.|
|HttpProcessor||Performs interceptor processing of requests and responses.|
Interface to be implemented by objects that can resolve
|HttpRequestInterceptorList||Provides access to an ordered list of request interceptors.|
|HttpResponseInterceptorList||Provides access to an ordered list of response interceptors.|
Default implementation of the
|BasicHttpProcessor||Keeps lists of interceptors for processing requests and responses.|
|HTTP||Constants and static helpers related to the HTTP protocol.|
|HttpDateGenerator||Generates a date in the format required by the HTTP protocol.|
|HttpRequestExecutor||Sends HTTP requests and receives the responses.|
|HttpRequestHandlerRegistry||Maintains a map of HTTP request handlers keyed by a request URI pattern.|
|HttpService||Minimalistic server-side implementation of an HTTP processor.|
|RequestConnControl||A request interceptor that suggests connection keep-alive to the server.|
|RequestContent||A request interceptor that decides about the transport encoding.|
|RequestDate||A request interceptor that adds a Date header.|
|RequestExpectContinue||A request interceptor that enables the expect-continue handshake.|
|RequestTargetHost||A request interceptor that sets the Host header for HTTP/1.1 requests.|
|RequestUserAgent||A request interceptor that adds a User-Agent header.|
|ResponseConnControl||A response interceptor that suggests connection keep-alive to the client.|
|ResponseContent||A response interceptor that sets up entity-related headers.|
|ResponseDate||A response interceptor that adds a Date header.|
|ResponseServer||A response interceptor that adds a Server header.|
Thread-safe extension of the
|UriPatternMatcher||Maintains a map of objects keyed by a request URI pattern.|