Interface Container
-
- All Known Implementing Classes:
RouterContainer
public interface ContainerTheContainerobject is used to process HTTP requests and compose HTTP responses. TheRequestobjects 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
Responseobject used to deliver the HTTP response will only commit and send once it has itsOutputStreamclosed.The
Containeris 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandle(Request req, Response resp)Used to pass theRequestandResponseto the container for processing.
-
-
-
Method Detail
-
handle
void handle(Request req, Response resp)
Used to pass theRequestandResponseto 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
Responseobject has been closed and committed.- Parameters:
req- the request that contains the client HTTP messageresp- the response used to deliver the server response
-
-