org.springframework.web.socket.sockjs.transport.session

## Class PollingSockJsSession

- java.lang.Object
- - org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
  - - org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession
    - - org.springframework.web.socket.sockjs.transport.session.PollingSockJsSession

- All Implemented Interfaces:
    SockJsSession, WebSocketSession

      public class PollingSockJsSession
      extends AbstractHttpSockJsSession

  A SockJS session for use with polling HTTP transports.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Field Summary

    - ### Fields inherited from class org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession

      `DISCONNECTED_CLIENT_LOG_CATEGORY, disconnectedClientLogger, logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PollingSockJsSession(String sessionId, SockJsServiceConfig config, WebSocketHandler wsHandler, Map<String,Object> attributes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `flushCache()` Only called if the connection is currently active
    `protected void` | `writeFrame(SockJsFrame frame)` For internal use within a TransportHandler and the (TransportHandler-specific) session class.

    - ### Methods inherited from class org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession

      `disconnect, getAcceptedProtocol, getBinaryMessageSizeLimit, getExtensions, getHandshakeHeaders, getLocalAddress, getMessageCache, getPrincipal, getRemoteAddress, getResponse, getTextMessageSizeLimit, getUri, handleInitialRequest, handleSuccessiveRequest, isActive, resetRequest, sendMessageInternal, setAcceptedProtocol, setBinaryMessageSizeLimit, setTextMessageSizeLimit, startAsyncRequest, writeFrameInternal, writePrelude`

    - ### Methods inherited from class org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession

      `cancelHeartbeat, close, close, delegateConnectionClosed, delegateConnectionEstablished, delegateError, delegateMessages, disableHeartbeat, getAttributes, getId, getSockJsServiceConfig, getTimeSinceLastActive, isClosed, isNew, isOpen, scheduleHeartbeat, sendHeartbeat, sendMessage, toString, tryCloseWithSockJsTransportError, updateLastActiveTime`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PollingSockJsSession

          public PollingSockJsSession(String sessionId,
                                      SockJsServiceConfig config,
                                      WebSocketHandler wsHandler,
                                      Map<String,Object> attributes)

  - ### Method Detail

    - #### flushCache

          protected void flushCache()
                             throws SockJsTransportFailureException

      Description copied from class: `AbstractHttpSockJsSession`
      Only called if the connection is currently active
      Specified by:
        `flushCache` in class `AbstractHttpSockJsSession`
      Throws:
        `SockJsTransportFailureException`

    - #### writeFrame

          protected void writeFrame(SockJsFrame frame)
                             throws SockJsTransportFailureException

      Description copied from class: `AbstractSockJsSession`
      For internal use within a TransportHandler and the (TransportHandler-specific) session class.
      Overrides:
        `writeFrame` in class `AbstractSockJsSession`
      Throws:
        `SockJsTransportFailureException`