Class WebsocketEvent

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  WebsocketEvent.Closed
      Indicates that a <f:websocket> has closed.
      static interface  WebsocketEvent.Opened
      Indicates that a <f:websocket> has opened.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      java.lang.String getChannel​()
      Returns the <f:websocket channel>.
      CloseReason.CloseCode getCloseCode​()
      Returns the close code.
      <S extends java.io.Serializable>
      S
      getUser​()
      Returns the <f:websocket user>, if any.
      int hashCode​()  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WebsocketEvent

        public WebsocketEvent​(java.lang.String channel,
                              java.io.Serializable user,
                              CloseReason.CloseCode code)
    • Method Detail

      • getChannel

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

        public <S extends java.io.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:
        java.lang.ClassCastException - When S is of wrong type.
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object