Class WebsocketEvent

    • Constructor Detail

      • WebsocketEvent

        public WebsocketEvent​(String channel,
                              Serializable user,
                              jakarta.websocket.CloseReason.CloseCode code)
    • Method Detail

      • getChannel

        public String getChannel()
        Returns the <f:websocket channel>.
        Returns:
        The web socket channel name.
      • getUser

        public <S extends Serializable> S getUser()
        Returns the <f:websocket user>, if any.
        Type Parameters:
        S - The generic type of the user identifier.
        Returns:
        The web socket user identifier, if any.
        Throws:
        ClassCastException - When S is of wrong type.
      • getCloseCode

        public jakarta.websocket.CloseReason.CloseCode getCloseCode()
        Returns the close code. If this returns null, then it was WebsocketEvent.Opened. If this returns non-null, then it was WebsocketEvent.Closed.
        Returns:
        The close code.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object