This interface specifies a component that receives requests from and returns responses to a client application.
A Connector performs the following general logic:
Receive a request from the client application
Create appropriate Request and Response instances and populate their fields based on the contents of the request.
For all Requests,
and serverPortMUST be set.
contentType and socket fields are also generally set.
and requestURI fields MUST be set.
the various addXXX methods MUST be called to record the presence of cookies,
headers and locales in the original request.
For all Responses,
handle and request fields MUST be set.
No additional fields must be set for HttpResponses.
Identify an appropriate Container to use for processing this request.
For a standalone Wombat installation,
this will probably be a (singleton) Engine.
For a Connector attaching Wombat to a web server,
this step could take advantage of parsing already performed within the web server to identify the Application,
and perhaps even the Wrapper,
to utilize in satisfying this Request.
Call invoke() on the selected Container,
passing the initialized Request and Response instances as arguments.
Return any response created by the Container to the client,
or return an appropriate error message if an exception of any type was thrown.