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, toString
public XhrClientSockJsSession(TransportRequest request, WebSocketHandler handler, XhrTransport transport, SettableListenableFuture<WebSocketSession> connectFuture)
public InetSocketAddress getLocalAddress()
WebSocketSession
public InetSocketAddress getRemoteAddress()
WebSocketSession
public 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 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