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 LockLock instance used to protect and provide conditions.private static final LoggerLogger.private final ConditionCondition used to signal when the response has been set.private final AbstractBodyRequest body.private HTTPResponseHTTPResponse instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) HTTPResponseGet the HTTPResponse instance.(package private) AbstractBodyGet the original request message.(package private) voidsetHTTPResponse(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.
-