Class PassThruSubProtocolHandler
java.lang.Object
org.springframework.integration.websocket.support.PassThruSubProtocolHandler
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterSessionEnded
(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel) void
afterSessionStarted
(WebSocketSession session, MessageChannel outputChannel) void
handleMessageFromClient
(WebSocketSession session, WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel) void
handleMessageToClient
(WebSocketSession session, Message<?> message) 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
-