public abstract class AbstractHttpSockJsSession extends AbstractSockJsSession
logger| Constructor and Description |
|---|
AbstractHttpSockJsSession(String sessionId,
SockJsConfiguration config,
WebSocketHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disconnect(CloseStatus status) |
protected abstract void |
flushCache()
Only called if the connection is currently active
|
protected BlockingQueue<String> |
getMessageCache() |
protected ServerHttpRequest |
getRequest() |
protected ServerHttpResponse |
getResponse() |
boolean |
isActive()
Polling and Streaming sessions periodically close the current HTTP request and
wait for the next request to come through.
|
protected void |
resetRequest() |
protected void |
sendMessageInternal(String message) |
void |
setInitialRequest(ServerHttpRequest request,
ServerHttpResponse response,
SockJsFrame.FrameFormat frameFormat) |
void |
setLongPollingRequest(ServerHttpRequest request,
ServerHttpResponse response,
SockJsFrame.FrameFormat frameFormat) |
protected void |
writeFrameInternal(SockJsFrame frame) |
protected void |
writePrelude() |
cancelHeartbeat, close, close, delegateConnectionClosed, delegateConnectionEstablished, delegateError, delegateMessages, getId, getPrincipal, getRemoteAddress, getRemoteHostName, getSockJsConfig, getTimeSinceLastActive, getUri, isClosed, isNew, isOpen, isSecure, scheduleHeartbeat, sendHeartbeat, sendMessage, setPrincipal, setRemoteAddress, setRemoteHostName, setUri, toString, tryCloseWithSockJsTransportError, updateLastActiveTime, writeFramepublic AbstractHttpSockJsSession(String sessionId, SockJsConfiguration config, WebSocketHandler handler)
public void setInitialRequest(ServerHttpRequest request, ServerHttpResponse response, SockJsFrame.FrameFormat frameFormat) throws TransportErrorException
TransportErrorExceptionprotected void writePrelude()
throws IOException
IOExceptionpublic void setLongPollingRequest(ServerHttpRequest request, ServerHttpResponse response, SockJsFrame.FrameFormat frameFormat) throws TransportErrorException
TransportErrorExceptionpublic boolean isActive()
AbstractSockJsSessionisActive in class AbstractSockJsSessionprotected BlockingQueue<String> getMessageCache()
protected ServerHttpRequest getRequest()
protected ServerHttpResponse getResponse()
protected final void sendMessageInternal(String message) throws IOException
sendMessageInternal in class AbstractSockJsSessionIOExceptionprotected abstract void flushCache()
throws IOException
IOExceptionprotected void disconnect(CloseStatus status)
disconnect in class AbstractSockJsSessionprotected void resetRequest()
protected void writeFrameInternal(SockJsFrame frame) throws IOException
writeFrameInternal in class AbstractSockJsSessionIOException