Interface Container
- All Known Implementing Classes:
RouterContainer
Container
object is used to process HTTP requests
and compose HTTP responses. The Request
objects that
are handed to this container contain all information relating to
the received message. The responsibility of the container is to
interpret the request and compose a suitable response.
All implementations must ensure that the container is thread safe
as it will receive multiple HTTP transactions concurrently. Also
it should be known that the Response
object used to
deliver the HTTP response will only commit and send once it has
its OutputStream
closed.
The Container
is entirely responsible for the HTTP
message headers and body. It is up to the implementation to ensure
that it complies to RFC 2616 or any previous specification. All
headers and the status line can be modified by this object.
-
Method Summary
-
Method Details
-
handle
Used to pass theRequest
andResponse
to the container for processing. Any implementation of this must ensure that this is thread safe, as it will receive many concurrent invocations each with a unique HTTP request.The request and response objects are used to interact with the connected pipeline, in such a way that requests and response objects can be delivered in sequence and without interference. The next request from a HTTP pipeline is only processed once the
Response
object has been closed and committed.- Parameters:
req
- the request that contains the client HTTP messageresp
- the response used to deliver the server response
-