Class PassThruSubProtocolHandler

java.lang.Object
org.springframework.integration.websocket.support.PassThruSubProtocolHandler
All Implemented Interfaces:
org.springframework.web.socket.messaging.SubProtocolHandler

public class PassThruSubProtocolHandler extends 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 Details

    • PassThruSubProtocolHandler

      public PassThruSubProtocolHandler()
  • Method Details

    • setSupportedProtocols

      public void setSupportedProtocols(String... supportedProtocols)
    • getSupportedProtocols

      public List<String> getSupportedProtocols()
      Specified by:
      getSupportedProtocols in interface org.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:
      handleMessageFromClient in interface org.springframework.web.socket.messaging.SubProtocolHandler
    • handleMessageToClient

      public void handleMessageToClient(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.Message<?> message) throws Exception
      Specified by:
      handleMessageToClient in interface org.springframework.web.socket.messaging.SubProtocolHandler
      Throws:
      Exception
    • resolveSessionId

      public String resolveSessionId(org.springframework.messaging.Message<?> message)
      Specified by:
      resolveSessionId in interface org.springframework.web.socket.messaging.SubProtocolHandler
    • afterSessionStarted

      public void afterSessionStarted(org.springframework.web.socket.WebSocketSession session, org.springframework.messaging.MessageChannel outputChannel)
      Specified by:
      afterSessionStarted in interface org.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:
      afterSessionEnded in interface org.springframework.web.socket.messaging.SubProtocolHandler