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) |
java.lang.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.
|
java.util.List<WebSocketExtension> |
getExtensions()
Return the negotiated extensions or
null if none was specified or
negotiated successfully. |
java.net.InetSocketAddress |
getLocalAddress()
Return the address on which the request was received.
|
java.net.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 java.net.InetSocketAddress getLocalAddress()
WebSocketSession
public java.net.InetSocketAddress getRemoteAddress()
WebSocketSession
public java.lang.String getAcceptedProtocol()
WebSocketSession
null
if none was specified or
negotiated successfully.public void setTextMessageSizeLimit(int messageSizeLimit)
WebSocketSession
public int getTextMessageSizeLimit()
WebSocketSession
public void setBinaryMessageSizeLimit(int messageSizeLimit)
WebSocketSession
public int getBinaryMessageSizeLimit()
WebSocketSession
public java.util.List<WebSocketExtension> getExtensions()
WebSocketSession
null
if none was specified or
negotiated successfully.protected void sendInternal(TextMessage message)
sendInternal
in class AbstractClientSockJsSession
protected void disconnect(CloseStatus status)
disconnect
in class AbstractClientSockJsSession