Class SocketHandler

  • All Implemented Interfaces:
    org.springframework.web.socket.WebSocketHandler

    @Component
    public class SocketHandler
    extends org.springframework.web.socket.handler.TextWebSocketHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      SocketHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterConnectionClosed​(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status)  
      void afterConnectionEstablished​(org.springframework.web.socket.WebSocketSession session)  
      void handleTextMessage​(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message)  
      • Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler

        handleBinaryMessage
      • Methods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler

        handleMessage, handlePongMessage, handleTransportError, supportsPartialMessages
    • Constructor Detail

      • SocketHandler

        public SocketHandler()
    • Method Detail

      • afterConnectionEstablished

        public void afterConnectionEstablished​(org.springframework.web.socket.WebSocketSession session)
        Specified by:
        afterConnectionEstablished in interface org.springframework.web.socket.WebSocketHandler
        Overrides:
        afterConnectionEstablished in class org.springframework.web.socket.handler.AbstractWebSocketHandler
      • afterConnectionClosed

        public void afterConnectionClosed​(org.springframework.web.socket.WebSocketSession session,
                                          org.springframework.web.socket.CloseStatus status)
                                   throws Exception
        Specified by:
        afterConnectionClosed in interface org.springframework.web.socket.WebSocketHandler
        Overrides:
        afterConnectionClosed in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception
      • handleTextMessage

        public void handleTextMessage​(org.springframework.web.socket.WebSocketSession session,
                                      org.springframework.web.socket.TextMessage message)
                               throws Exception
        Overrides:
        handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception