Class PassThruSubProtocolHandler
java.lang.Object
org.springframework.integration.websocket.support.PassThruSubProtocolHandler
- All Implemented Interfaces:
SubProtocolHandler
public class PassThruSubProtocolHandler extends Object implements SubProtocolHandler
The simple 'pass thru'
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.- Since:
- 4.1
- Author:
- Artem Bilan
-
Constructor Summary
Constructors Constructor Description PassThruSubProtocolHandler()
-
Method Summary
Modifier and Type Method 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)
-
Constructor Details
-
PassThruSubProtocolHandler
public PassThruSubProtocolHandler()
-
-
Method Details
-
setSupportedProtocols
-
getSupportedProtocols
- Specified by:
getSupportedProtocols
in interfaceSubProtocolHandler
-
handleMessageFromClient
public void handleMessageFromClient(WebSocketSession session, WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel)- Specified by:
handleMessageFromClient
in interfaceSubProtocolHandler
-
handleMessageToClient
- Specified by:
handleMessageToClient
in interfaceSubProtocolHandler
- Throws:
Exception
-
resolveSessionId
- Specified by:
resolveSessionId
in interfaceSubProtocolHandler
-
afterSessionStarted
- Specified by:
afterSessionStarted
in interfaceSubProtocolHandler
-
afterSessionEnded
public void afterSessionEnded(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel)- Specified by:
afterSessionEnded
in interfaceSubProtocolHandler
-