Package org.igniterealtime.jbosh
Class HTTPExchange
java.lang.Object
org.igniterealtime.jbosh.HTTPExchange
A request and response pair representing a single exchange with a remote
content manager. This is primarily a container class intended to maintain
the relationship between the request and response but allows the response
to be added after the fact.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Lock
Lock instance used to protect and provide conditions.private static final Logger
Logger.private final Condition
Condition used to signal when the response has been set.private final AbstractBody
Request body.private HTTPResponse
HTTPResponse instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) HTTPResponse
Get the HTTPResponse instance.(package private) AbstractBody
Get the original request message.(package private) void
setHTTPResponse
(HTTPResponse resp) Set the HTTPResponse instance.
-
Field Details
-
LOG
Logger. -
request
Request body. -
lock
Lock instance used to protect and provide conditions. -
ready
Condition used to signal when the response has been set. -
response
HTTPResponse instance.
-
-
Constructor Details
-
HTTPExchange
HTTPExchange(AbstractBody req) Create a new request/response pair object.- Parameters:
req
- request message body
-
-
Method Details
-
getRequest
AbstractBody getRequest()Get the original request message.- Returns:
- request message body.
-
setHTTPResponse
Set the HTTPResponse instance. -
getHTTPResponse
HTTPResponse getHTTPResponse()Get the HTTPResponse instance.- Returns:
- HTTPResponse instance associated with the request.
-