public class PassThruSubProtocolHandler extends Object implements SubProtocolHandler
SubProtocolHandler, when there is no interests in the
WebSocket sub-protocols.
This class just convert Message to the WebSocketMessage
on 'send' part and vise versa - on 'receive' part.| Constructor and Description |
|---|
PassThruSubProtocolHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSessionEnded(WebSocketSession session,
CloseStatus closeStatus,
MessageChannel outputChannel) |
void |
afterSessionStarted(WebSocketSession session,
MessageChannel outputChannel) |
List<String> |
getSupportedProtocols() |
void |
handleMessageFromClient(WebSocketSession session,
WebSocketMessage<?> webSocketMessage,
MessageChannel outputChannel) |
void |
handleMessageToClient(WebSocketSession session,
Message<?> message) |
String |
resolveSessionId(Message<?> message) |
void |
setSupportedProtocols(String... supportedProtocols) |
public void setSupportedProtocols(String... supportedProtocols)
public List<String> getSupportedProtocols()
getSupportedProtocols in interface SubProtocolHandlerpublic void handleMessageFromClient(WebSocketSession session, WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel)
handleMessageFromClient in interface SubProtocolHandlerpublic void handleMessageToClient(WebSocketSession session, Message<?> message) throws Exception
handleMessageToClient in interface SubProtocolHandlerExceptionpublic String resolveSessionId(Message<?> message)
resolveSessionId in interface SubProtocolHandlerpublic void afterSessionStarted(WebSocketSession session, MessageChannel outputChannel)
afterSessionStarted in interface SubProtocolHandlerpublic void afterSessionEnded(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel)
afterSessionEnded in interface SubProtocolHandler