public class PassThruSubProtocolHandler extends java.lang.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) |
java.util.List<java.lang.String> |
getSupportedProtocols() |
void |
handleMessageFromClient(WebSocketSession session,
WebSocketMessage<?> webSocketMessage,
MessageChannel outputChannel) |
void |
handleMessageToClient(WebSocketSession session,
Message<?> message) |
java.lang.String |
resolveSessionId(Message<?> message) |
void |
setSupportedProtocols(java.lang.String... supportedProtocols) |
public void setSupportedProtocols(java.lang.String... supportedProtocols)
public java.util.List<java.lang.String> getSupportedProtocols()
getSupportedProtocols
in interface SubProtocolHandler
public void handleMessageFromClient(WebSocketSession session, WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel) throws java.lang.Exception
handleMessageFromClient
in interface SubProtocolHandler
java.lang.Exception
public void handleMessageToClient(WebSocketSession session, Message<?> message) throws java.lang.Exception
handleMessageToClient
in interface SubProtocolHandler
java.lang.Exception
public java.lang.String resolveSessionId(Message<?> message)
resolveSessionId
in interface SubProtocolHandler
public void afterSessionStarted(WebSocketSession session, MessageChannel outputChannel) throws java.lang.Exception
afterSessionStarted
in interface SubProtocolHandler
java.lang.Exception
public void afterSessionEnded(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel) throws java.lang.Exception
afterSessionEnded
in interface SubProtocolHandler
java.lang.Exception