Package org.igniterealtime.jbosh
Interface HTTPSender
-
- All Known Implementing Classes:
ApacheHTTPSender
interface HTTPSender
Interface used to represent code which can send a BOSH XML body over HTTP to a connection manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Dispose of all resources used to provide the required services.void
init(BOSHClientConfig sessionCfg)
Initialize the HTTP sender instance for use with the session provided.HTTPResponse
send(CMSessionParams params, AbstractBody body)
Create aCallable
instance which can be used to send the request specified to the connection manager.
-
-
-
Method Detail
-
init
void init(BOSHClientConfig sessionCfg)
Initialize the HTTP sender instance for use with the session provided. This method will be called once before use of the service instance.- Parameters:
sessionCfg
- session configuration
-
destroy
void destroy()
Dispose of all resources used to provide the required services. This method will be called once when the service instance is no longer required.
-
send
HTTPResponse send(CMSessionParams params, AbstractBody body)
Create aCallable
instance which can be used to send the request specified to the connection manager. This method should return immediately, prior to doing any real work. The invocation of the returnedCallable
should send the request (if it has not already been sent by the time of the call), block while waiting for the response, and then return the response body.- Parameters:
params
- CM session creation resopnse paramsbody
- request body to send- Returns:
- callable used to access the response
-
-