public interface TransportRequest
Transport
and
session
implementations, about a request
to connect to a SockJS server endpoint over a given transport.
Note that a single request to connect via SockJsClient
may result
in multiple instances of TransportRequest
, one for each transport
before a connection is successfully established.
Modifier and Type | Method and Description |
---|---|
void |
addTimeoutTask(Runnable runnable)
Register a timeout cleanup task to invoke if the SockJS session is not
fully established within the calculated retransmission timeout period.
|
HttpHeaders |
getHandshakeHeaders()
Return the headers to send with the connect request.
|
HttpHeaders |
getHttpRequestHeaders()
Return the headers to add to all other HTTP requests besides the handshake
request such as XHR receive and send requests.
|
SockJsMessageCodec |
getMessageCodec()
Return the message codec to use for encoding SockJS messages.
|
SockJsUrlInfo |
getSockJsUrlInfo()
Return information about the SockJS URL including server and session ID.
|
URI |
getTransportUrl()
Return the transport URL for the given transport.
|
Principal |
getUser()
Return the user associated with the request, if any.
|
SockJsUrlInfo getSockJsUrlInfo()
HttpHeaders getHandshakeHeaders()
HttpHeaders getHttpRequestHeaders()
URI getTransportUrl()
For an XhrTransport
this is the URL for receiving messages.
SockJsMessageCodec getMessageCodec()
void addTimeoutTask(Runnable runnable)