Package org.igniterealtime.jbosh
Class HTTPExchange
- java.lang.Object
-
- org.igniterealtime.jbosh.HTTPExchange
-
final class HTTPExchange extends java.lang.Object
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
Fields Modifier and Type Field Description private java.util.concurrent.locks.Lock
lock
Lock instance used to protect and provide conditions.private static java.util.logging.Logger
LOG
Logger.private java.util.concurrent.locks.Condition
ready
Condition used to signal when the response has been set.private AbstractBody
request
Request body.private HTTPResponse
response
HTTPResponse instance.
-
Constructor Summary
Constructors Constructor Description HTTPExchange(AbstractBody req)
Create a new request/response pair object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) HTTPResponse
getHTTPResponse()
Get the HTTPResponse instance.(package private) AbstractBody
getRequest()
Get the original request message.(package private) void
setHTTPResponse(HTTPResponse resp)
Set the HTTPResponse instance.
-
-
-
Field Detail
-
LOG
private static final java.util.logging.Logger LOG
Logger.
-
request
private final AbstractBody request
Request body.
-
lock
private final java.util.concurrent.locks.Lock lock
Lock instance used to protect and provide conditions.
-
ready
private final java.util.concurrent.locks.Condition ready
Condition used to signal when the response has been set.
-
response
private HTTPResponse response
HTTPResponse instance.
-
-
Constructor Detail
-
HTTPExchange
HTTPExchange(AbstractBody req)
Create a new request/response pair object.- Parameters:
req
- request message body
-
-
Method Detail
-
getRequest
AbstractBody getRequest()
Get the original request message.- Returns:
- request message body.
-
setHTTPResponse
void setHTTPResponse(HTTPResponse resp)
Set the HTTPResponse instance.
-
getHTTPResponse
HTTPResponse getHTTPResponse()
Get the HTTPResponse instance.- Returns:
- HTTPResponse instance associated with the request.
-
-