类 StreamingSockJsSession
- 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.StreamingSockJsSession
- 所有已实现的接口:
Closeable
,AutoCloseable
,SockJsSession
,WebSocketSession
public abstract class StreamingSockJsSession extends AbstractHttpSockJsSession
A SockJS session for use with streaming HTTP transports.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
字段概要
从类继承的字段 org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
DISCONNECTED_CLIENT_LOG_CATEGORY, disconnectedClientLogger, logger, responseLock
构造器概要
构造器 构造器 说明 StreamingSockJsSession(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 abstract byte[]
getPrelude(ServerHttpRequest request)
Get the prelude to write to the response before any other data.protected void
handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, boolean initialRequest)
Invoked when a SockJS transport request is received.从类继承的方法 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, writeFrame
构造器详细资料
StreamingSockJsSession
public StreamingSockJsSession(String sessionId, SockJsServiceConfig config, WebSocketHandler wsHandler, Map<String,Object> attributes)
方法详细资料
getPrelude
protected abstract byte[] getPrelude(ServerHttpRequest request)
Get the prelude to write to the response before any other data.- 从以下版本开始:
- 4.2
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.