java.lang.Object
jakarta.faces.event.WebsocketEvent
- All Implemented Interfaces:
Serializable
This web socket event will be fired when a new <f:websocket>
has been
@
WebsocketEvent.Opened
or @
WebsocketEvent.Closed
. An application scoped CDI bean can
@
Observes
them.
For detailed usage instructions, see @
Push
javadoc.
- Since:
- 2.3
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Indicates that a<f:websocket>
has closed.static @interface
Indicates that a<f:websocket>
has opened. -
Constructor Summary
ConstructorDescriptionWebsocketEvent
(String channel, Serializable user, CloseReason.CloseCode code) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the<f:websocket channel>
.Returns the close code.<S extends Serializable>
SgetUser()
Returns the<f:websocket user>
, if any.int
hashCode()
toString()
-
Constructor Details
-
WebsocketEvent
-
-
Method Details
-
getChannel
-
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
- WhenS
is of wrong type.
-
getCloseCode
Returns the close code. If this returnsnull
, then it wasWebsocketEvent.Opened
. If this returns non-null
, then it wasWebsocketEvent.Closed
.- Returns:
- The close code.
-
hashCode
-
equals
-
toString
-