Class PassThruSubProtocolHandler
java.lang.Object
org.springframework.integration.websocket.support.PassThruSubProtocolHandler
- All Implemented Interfaces:
org.springframework.web.socket.messaging.SubProtocolHandler
public class PassThruSubProtocolHandler
extends java.lang.Object
implements org.springframework.web.socket.messaging.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
-
Constructor Summary
Constructors Constructor Description PassThruSubProtocolHandler() -
Method Summary
Modifier and Type Method Description voidafterSessionEnded(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus, org.springframework.messaging.MessageChannel outputChannel)voidafterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel)java.util.List<java.lang.String>getSupportedProtocols()voidhandleMessageFromClient(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.WebSocketMessage<?> webSocketMessage, org.springframework.messaging.MessageChannel outputChannel)voidhandleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message)java.lang.StringresolveSessionId(org.springframework.messaging.Message<?> message)voidsetSupportedProtocols(java.lang.String... supportedProtocols)
-
Constructor Details
-
PassThruSubProtocolHandler
public PassThruSubProtocolHandler()
-
-
Method Details
-
setSupportedProtocols
public void setSupportedProtocols(java.lang.String... supportedProtocols) -
getSupportedProtocols
public java.util.List<java.lang.String> getSupportedProtocols()- Specified by:
getSupportedProtocolsin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
handleMessageFromClient
public void handleMessageFromClient(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.WebSocketMessage<?> webSocketMessage, org.springframework.messaging.MessageChannel outputChannel)- Specified by:
handleMessageFromClientin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
handleMessageToClient
public void handleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message) throws java.lang.Exception- Specified by:
handleMessageToClientin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler- Throws:
java.lang.Exception
-
resolveSessionId
public java.lang.String resolveSessionId(org.springframework.messaging.Message<?> message)- Specified by:
resolveSessionIdin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
afterSessionStarted
public void afterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel)- Specified by:
afterSessionStartedin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-
afterSessionEnded
public void afterSessionEnded(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus, org.springframework.messaging.MessageChannel outputChannel)- Specified by:
afterSessionEndedin interfaceorg.springframework.web.socket.messaging.SubProtocolHandler
-