Interface WebSocketHandler

    • Method Detail

      • afterConnectionEstablished

        void afterConnectionEstablished​(WebSocketSession session)
                                 throws Exception
        Invoked after WebSocket negotiation has succeeded and the WebSocket connection is opened and ready for use.
        Throws:
        Exception - this method can handle or propagate exceptions; see class-level Javadoc for details.
      • afterConnectionClosed

        void afterConnectionClosed​(WebSocketSession session,
                                   CloseStatus closeStatus)
                            throws Exception
        Invoked after the WebSocket connection has been closed by either side, or after a transport error has occurred. Although the session may technically still be open, depending on the underlying implementation, sending messages at this point is discouraged and most likely will not succeed.
        Throws:
        Exception - this method can handle or propagate exceptions; see class-level Javadoc for details.