Package | Description |
---|---|
org.springframework.web.socket |
Common abstractions and Spring configuration support for WebSocket applications.
|
org.springframework.web.socket.adapter |
Classes adapting Spring's WebSocket API to and from WebSocket providers.
|
org.springframework.web.socket.adapter.jetty |
Adapter classes for the Jetty WebSocket API.
|
org.springframework.web.socket.adapter.standard |
Adapter classes for the standard Java WebSocket API.
|
org.springframework.web.socket.handler |
Convenient
WebSocketHandler
implementations and decorators. |
org.springframework.web.socket.messaging |
WebSocket integration for Spring's messaging module.
|
org.springframework.web.socket.sockjs.client |
SockJS client implementation of
WebSocketClient . |
org.springframework.web.socket.sockjs.transport.handler |
TransportHandler
implementation classes as well as a concrete
SockJsService . |
org.springframework.web.socket.sockjs.transport.session |
SockJS specific implementations of
WebSocketSession . |
Modifier and Type | Field and Description |
---|---|
static CloseStatus |
CloseStatus.BAD_DATA
"1007 indicates that an endpoint is terminating the connection because it has
received data within a message that was not consistent with the type of the message
(e.g., non-UTF-8 [RFC3629] data within a text message)."
|
static CloseStatus |
CloseStatus.GOING_AWAY
"1001 indicates that an endpoint is "going away", such as a server going down or a
browser having navigated away from a page."
|
static CloseStatus |
CloseStatus.NO_CLOSE_FRAME
"1006 is a reserved value and MUST NOT be set as a status code in a Close control
frame by an endpoint.
|
static CloseStatus |
CloseStatus.NO_STATUS_CODE
"1005 is a reserved value and MUST NOT be set as a status code in a Close control
frame by an endpoint.
|
static CloseStatus |
CloseStatus.NORMAL
"1000 indicates a normal closure, meaning that the purpose for which the connection
was established has been fulfilled."
|
static CloseStatus |
CloseStatus.NOT_ACCEPTABLE
"1003 indicates that an endpoint is terminating the connection because it has
received a type of data it cannot accept (e.g., an endpoint that understands only
text data MAY send this if it receives a binary message)."
|
static CloseStatus |
CloseStatus.POLICY_VIOLATION
"1008 indicates that an endpoint is terminating the connection because it has
received a message that violates its policy.
|
static CloseStatus |
CloseStatus.PROTOCOL_ERROR
"1002 indicates that an endpoint is terminating the connection due to a protocol
error."
|
static CloseStatus |
CloseStatus.REQUIRED_EXTENSION
"1010 indicates that an endpoint (client) is terminating the connection because it
has expected the server to negotiate one or more extension, but the server didn't
return them in the response message of the WebSocket handshake.
|
static CloseStatus |
CloseStatus.SERVER_ERROR
"1011 indicates that a server is terminating the connection because it encountered
an unexpected condition that prevented it from fulfilling the request."
|
static CloseStatus |
CloseStatus.SERVICE_OVERLOAD
"1013 indicates that the service is experiencing overload.
|
static CloseStatus |
CloseStatus.SERVICE_RESTARTED
"1012 indicates that the service is restarted.
|
static CloseStatus |
CloseStatus.SESSION_NOT_RELIABLE
A status code for use within the framework the indicate a session has
become unreliable (e.g.
|
static CloseStatus |
CloseStatus.TLS_HANDSHAKE_FAILURE
"1015 is a reserved value and MUST NOT be set as a status code in a Close control
frame by an endpoint.
|
static CloseStatus |
CloseStatus.TOO_BIG_TO_PROCESS
"1009 indicates that an endpoint is terminating the connection because it has
received a message that is too big for it to process."
|
Modifier and Type | Method and Description |
---|---|
CloseStatus |
CloseStatus.withReason(String reason)
Create a new
CloseStatus from this one with the specified reason. |
Modifier and Type | Method and Description |
---|---|
void |
WebSocketHandler.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus)
Invoked after the WebSocket connection has been closed by either side, or after a
transport error has occurred.
|
void |
WebSocketSession.close(CloseStatus status)
Close the WebSocket connection with the given close status.
|
boolean |
CloseStatus.equalsCode(CloseStatus other) |
Modifier and Type | Method and Description |
---|---|
void |
AbstractWebSocketSession.close(CloseStatus status) |
protected abstract void |
AbstractWebSocketSession.closeInternal(CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
protected void |
JettyWebSocketSession.closeInternal(CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
protected void |
StandardWebSocketSession.closeInternal(CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
CloseStatus |
SessionLimitExceededException.getStatus() |
Modifier and Type | Method and Description |
---|---|
void |
LoggingWebSocketHandlerDecorator.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus) |
void |
ExceptionWebSocketHandlerDecorator.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus) |
void |
PerConnectionWebSocketHandler.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus) |
void |
AbstractWebSocketHandler.afterConnectionClosed(WebSocketSession session,
CloseStatus status) |
void |
WebSocketHandlerDecorator.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus) |
void |
ConcurrentWebSocketSessionDecorator.close(CloseStatus status) |
void |
WebSocketSessionDecorator.close(CloseStatus status) |
Constructor and Description |
---|
SessionLimitExceededException(String message,
CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
CloseStatus |
SessionDisconnectEvent.getCloseStatus()
Return the status with which the session was closed.
|
Modifier and Type | Method and Description |
---|---|
void |
SubProtocolWebSocketHandler.afterConnectionClosed(WebSocketSession session,
CloseStatus closeStatus) |
void |
SubProtocolHandler.afterSessionEnded(WebSocketSession session,
CloseStatus closeStatus,
MessageChannel outputChannel)
Invoked after a
WebSocketSession has ended. |
void |
StompSubProtocolHandler.afterSessionEnded(WebSocketSession session,
CloseStatus closeStatus,
MessageChannel outputChannel) |
Constructor and Description |
---|
SessionDisconnectEvent(Object source,
Message<byte[]> message,
String sessionId,
CloseStatus closeStatus)
Create a new SessionDisconnectEvent.
|
SessionDisconnectEvent(Object source,
Message<byte[]> message,
String sessionId,
CloseStatus closeStatus,
Principal user)
Create a new SessionDisconnectEvent.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractClientSockJsSession.afterTransportClosed(CloseStatus closeStatus) |
void |
AbstractClientSockJsSession.close(CloseStatus status) |
protected void |
AbstractClientSockJsSession.closeInternal(CloseStatus status) |
protected abstract void |
AbstractClientSockJsSession.disconnect(CloseStatus status) |
protected void |
WebSocketClientSockJsSession.disconnect(CloseStatus status) |
protected void |
XhrClientSockJsSession.disconnect(CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
void |
SockJsWebSocketHandler.afterConnectionClosed(WebSocketSession wsSession,
CloseStatus status) |
Modifier and Type | Method and Description |
---|---|
void |
AbstractSockJsSession.close(CloseStatus status)
Performs cleanup and notify the
WebSocketHandler . |
void |
AbstractSockJsSession.delegateConnectionClosed(CloseStatus status)
Invoked when the underlying connection is closed.
|
protected void |
WebSocketServerSockJsSession.disconnect(CloseStatus status) |
protected void |
AbstractHttpSockJsSession.disconnect(CloseStatus status) |
protected abstract void |
AbstractSockJsSession.disconnect(CloseStatus status)
Actually close the underlying WebSocket session or in the case of HTTP
transports complete the underlying request.
|
void |
AbstractSockJsSession.tryCloseWithSockJsTransportError(Throwable error,
CloseStatus closeStatus)
Close due to error arising from SockJS transport handling.
|