Class XhrClientSockJsSession

java.lang.Object
org.springframework.web.socket.sockjs.client.AbstractClientSockJsSession
org.springframework.web.socket.sockjs.client.XhrClientSockJsSession
All Implemented Interfaces:
Closeable, AutoCloseable, WebSocketSession

public class XhrClientSockJsSession extends AbstractClientSockJsSession
An extension of AbstractClientSockJsSession for use with HTTP transports simulating a WebSocket session.
Since:
4.1
Author:
Rossen Stoyanchev
  • Constructor Details

  • Method Details

    • getHeaders

      public HttpHeaders getHeaders()
    • getLocalAddress

      public InetSocketAddress getLocalAddress()
      Description copied from interface: WebSocketSession
      Return the address on which the request was received.
    • getRemoteAddress

      public InetSocketAddress getRemoteAddress()
      Description copied from interface: WebSocketSession
      Return the address of the remote client.
    • getAcceptedProtocol

      public String getAcceptedProtocol()
      Description copied from interface: WebSocketSession
      Return the negotiated sub-protocol.
      Returns:
      the protocol identifier, or null if no protocol was specified or negotiated successfully
    • setTextMessageSizeLimit

      public void setTextMessageSizeLimit(int messageSizeLimit)
      Description copied from interface: WebSocketSession
      Configure the maximum size for an incoming text message.
    • getTextMessageSizeLimit

      public int getTextMessageSizeLimit()
      Description copied from interface: WebSocketSession
      Get the configured maximum size for an incoming text message.
    • setBinaryMessageSizeLimit

      public void setBinaryMessageSizeLimit(int messageSizeLimit)
      Description copied from interface: WebSocketSession
      Configure the maximum size for an incoming binary message.
    • getBinaryMessageSizeLimit

      public int getBinaryMessageSizeLimit()
      Description copied from interface: WebSocketSession
      Get the configured maximum size for an incoming binary message.
    • getExtensions

      public List<WebSocketExtension> getExtensions()
      Description copied from interface: WebSocketSession
      Determine the negotiated extensions.
      Returns:
      the list of extensions, or an empty list if no extension was specified or negotiated successfully
    • sendInternal

      protected void sendInternal(TextMessage message)
      Specified by:
      sendInternal in class AbstractClientSockJsSession
    • disconnect

      protected void disconnect(CloseStatus status)
      Specified by:
      disconnect in class AbstractClientSockJsSession