WebSocketHandler.
org.springframework.web.socket.server.support.WebSocketHttpRequestHandler , org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService
| Modifier and Type | Method and Description |
|---|---|
| public void | afterHandshake(ServerHttpRequest
the current request request, ServerHttpResponse the current response response, WebSocketHandler the target WebSocket handler wsHandler, Exception an exception raised during the handshake, or exception)null if noneInvoked after the handshake is done. |
| public boolean | Returns: whether to proceed with the handshake (true) or abort (false)the current request request, ServerHttpResponse the current response response, WebSocketHandler the target WebSocket handler wsHandler, Map<String, Object> the attributes from the HTTP handshake to associate with the WebSocket
session; the provided attributes are copied, the original map is not used. attributes)Invoked before the handshake is processed. |
| afterHandshake | back to summary |
|---|---|
| public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception exception) Invoked after the handshake is done. The response status and headers indicate the results of the handshake, i.e. whether it was successful or not.
| |
| beforeHandshake | back to summary |
|---|---|
| public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception Invoked before the handshake is processed.
| |