public class XhrClientSockJsSession extends AbstractClientSockJsSession
AbstractClientSockJsSession
for use with HTTP
transports simulating a WebSocket session.logger
Constructor and Description |
---|
XhrClientSockJsSession(TransportRequest request,
WebSocketHandler handler,
XhrTransport transport,
SettableListenableFuture<WebSocketSession> connectFuture) |
Modifier and Type | Method and Description |
---|---|
protected void |
disconnect(CloseStatus status) |
String |
getAcceptedProtocol()
Return the negotiated sub-protocol.
|
int |
getBinaryMessageSizeLimit()
Get the configured maximum size for an incoming binary message.
|
List<WebSocketExtension> |
getExtensions()
Determine the negotiated extensions.
|
HttpHeaders |
getHeaders() |
InetSocketAddress |
getLocalAddress()
Return the address on which the request was received.
|
InetSocketAddress |
getRemoteAddress()
Return the address of the remote client.
|
int |
getTextMessageSizeLimit()
Get the configured maximum size for an incoming text message.
|
protected void |
sendInternal(TextMessage message) |
void |
setBinaryMessageSizeLimit(int messageSizeLimit)
Configure the maximum size for an incoming binary message.
|
void |
setTextMessageSizeLimit(int messageSizeLimit)
Configure the maximum size for an incoming text message.
|
afterTransportClosed, close, close, closeInternal, getAttributes, getHandshakeHeaders, getId, getMessageCodec, getPrincipal, getUri, getWebSocketHandler, handleFrame, handleTransportError, isDisconnected, isOpen, sendMessage, toString
public XhrClientSockJsSession(TransportRequest request, WebSocketHandler handler, XhrTransport transport, SettableListenableFuture<WebSocketSession> connectFuture)
public HttpHeaders getHeaders()
public InetSocketAddress getLocalAddress()
WebSocketSession
public InetSocketAddress getRemoteAddress()
WebSocketSession
public String getAcceptedProtocol()
WebSocketSession
null
if no protocol
was specified or negotiated successfullypublic void setTextMessageSizeLimit(int messageSizeLimit)
WebSocketSession
public int getTextMessageSizeLimit()
WebSocketSession
public void setBinaryMessageSizeLimit(int messageSizeLimit)
WebSocketSession
public int getBinaryMessageSizeLimit()
WebSocketSession
public List<WebSocketExtension> getExtensions()
WebSocketSession
protected void sendInternal(TextMessage message)
sendInternal
in class AbstractClientSockJsSession
protected void disconnect(CloseStatus status)
disconnect
in class AbstractClientSockJsSession