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 or
null if none was specified or
negotiated successfully. |
int |
getBinaryMessageSizeLimit()
Get the configured maximum size for an incoming binary message.
|
List<WebSocketExtension> |
getExtensions()
Return the negotiated extensions or
null if none was specified or
negotiated successfully. |
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, toStringpublic XhrClientSockJsSession(TransportRequest request, WebSocketHandler handler, XhrTransport transport, SettableListenableFuture<WebSocketSession> connectFuture)
public InetSocketAddress getLocalAddress()
WebSocketSessionpublic InetSocketAddress getRemoteAddress()
WebSocketSessionpublic String getAcceptedProtocol()
WebSocketSessionnull if none was specified or
negotiated successfully.public void setTextMessageSizeLimit(int messageSizeLimit)
WebSocketSessionpublic int getTextMessageSizeLimit()
WebSocketSessionpublic void setBinaryMessageSizeLimit(int messageSizeLimit)
WebSocketSessionpublic int getBinaryMessageSizeLimit()
WebSocketSessionpublic List<WebSocketExtension> getExtensions()
WebSocketSessionnull if none was specified or
negotiated successfully.protected void sendInternal(TextMessage message)
sendInternal in class AbstractClientSockJsSessionprotected void disconnect(CloseStatus status)
disconnect in class AbstractClientSockJsSession