Class AbstractSockJsSession

java.lang.Object
org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
All Implemented Interfaces:
Closeable, AutoCloseable, SockJsSession, WebSocketSession
Direct Known Subclasses:
AbstractHttpSockJsSession, WebSocketServerSockJsSession

public abstract class AbstractSockJsSession extends Object implements SockJsSession
An abstract base class for SockJS sessions implementing SockJsSession.
Since:
4.0
Author:
Rossen Stoyanchev, Sam Brannen
  • Field Details

    • DISCONNECTED_CLIENT_LOG_CATEGORY

      public static final String DISCONNECTED_CLIENT_LOG_CATEGORY
      Log category to use for network failure after a client has gone away.
      See Also:
    • logger

      protected final org.apache.commons.logging.Log logger
    • responseLock

      protected final Object responseLock
  • Constructor Details

    • AbstractSockJsSession

      public AbstractSockJsSession(String id, SockJsServiceConfig config, WebSocketHandler handler, @Nullable Map<String,Object> attributes)
      Create a new instance.
      Parameters:
      id - the session ID
      config - the SockJS service configuration options
      handler - the recipient of SockJS messages
      attributes - the attributes from the HTTP handshake to associate with the WebSocket session; the provided attributes are copied, the original map is not used.
  • Method Details