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.
|
int |
getBinaryMessageSizeLimit()
Get the configured maximum size for an incoming binary message.
|
java.util.List<WebSocketExtension> |
getExtensions()
Determine the negotiated extensions.
|
HttpHeaders |
getHeaders() |
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 HttpHeaders getHeaders()
public java.net.InetSocketAddress getLocalAddress()
WebSocketSession
public java.net.InetSocketAddress getRemoteAddress()
WebSocketSession
public java.lang.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 java.util.List<WebSocketExtension> getExtensions()
WebSocketSession
protected void sendInternal(TextMessage message)
sendInternal
in class AbstractClientSockJsSession
protected void disconnect(CloseStatus status)
disconnect
in class AbstractClientSockJsSession