类 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
- 所有已实现的接口:
Closeable
,AutoCloseable
,SockJsSession
,WebSocketSession
public class PollingSockJsSession extends AbstractHttpSockJsSession
A SockJS session for use with polling HTTP transports.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
字段概要
从类继承的字段 org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
DISCONNECTED_CLIENT_LOG_CATEGORY, disconnectedClientLogger, logger, responseLock
构造器概要
构造器 构造器 说明 PollingSockJsSession(String sessionId, SockJsServiceConfig config, WebSocketHandler wsHandler, Map<String,Object> attributes)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
flushCache()
Called when the connection is active and ready to write to the response.protected void
handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, boolean initialRequest)
Invoked when a SockJS transport request is received.protected void
writeFrame(SockJsFrame frame)
For internal use within a TransportHandler and the (TransportHandler-specific) session class.从类继承的方法 org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession
disconnect, getAcceptedProtocol, getBinaryMessageSizeLimit, getExtensions, getHandshakeHeaders, getLocalAddress, getMessageCache, getPrincipal, getRemoteAddress, getTextMessageSizeLimit, getUri, handleInitialRequest, handleSuccessiveRequest, isActive, resetRequest, sendMessageInternal, setAcceptedProtocol, setBinaryMessageSizeLimit, setTextMessageSizeLimit, writeFrameInternal
从类继承的方法 org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
cancelHeartbeat, close, close, delegateConnectionClosed, delegateConnectionEstablished, delegateError, delegateMessages, disableHeartbeat, getAttributes, getId, getMessageCodec, getSockJsServiceConfig, getTimeSinceLastActive, isClosed, isNew, isOpen, scheduleHeartbeat, sendHeartbeat, sendMessage, toString, tryCloseWithSockJsTransportError, updateLastActiveTime
构造器详细资料
PollingSockJsSession
public PollingSockJsSession(String sessionId, SockJsServiceConfig config, WebSocketHandler wsHandler, Map<String,Object> attributes)
方法详细资料
handleRequestInternal
protected void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, boolean initialRequest) throws IOException
从类复制的说明:AbstractHttpSockJsSession
Invoked when a SockJS transport request is received.- 指定者:
handleRequestInternal
在类中AbstractHttpSockJsSession
- 参数:
request
- the current requestresponse
- the current responseinitialRequest
- whether it is the first request for the session- 抛出:
IOException
flushCache
protected void flushCache() throws SockJsTransportFailureException
从类复制的说明:AbstractHttpSockJsSession
Called when the connection is active and ready to write to the response. Subclasses should only call this method from a method where the "responseLock" is acquired.
writeFrame
protected void writeFrame(SockJsFrame frame) throws SockJsTransportFailureException
从类复制的说明:AbstractSockJsSession
For internal use within a TransportHandler and the (TransportHandler-specific) session class.