public final class WebsocketEvent extends Object implements 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.
Push,
WebsocketEvent.Opened,
WebsocketEvent.Closed,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static interface |
WebsocketEvent.Closed
Indicates that a |
static interface |
WebsocketEvent.Opened
Indicates that a |
| Constructor and Description |
|---|
WebsocketEvent(String channel,
Serializable user,
javax.websocket.CloseReason.CloseCode code) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
String |
getChannel()
Returns the
<f:websocket channel>. |
javax.websocket.CloseReason.CloseCode |
getCloseCode()
Returns the close code.
|
<S extends Serializable> |
getUser()
Returns the
<f:websocket user>, if any. |
int |
hashCode() |
String |
toString() |
public WebsocketEvent(String channel, Serializable user, javax.websocket.CloseReason.CloseCode code)
public String getChannel()
<f:websocket channel>.public <S extends Serializable> S getUser()
<f:websocket user>, if any.S - The generic type of the user identifier.ClassCastException - When S is of wrong type.public javax.websocket.CloseReason.CloseCode getCloseCode()
null, then it was WebsocketEvent.Opened.
If this returns non-null, then it was WebsocketEvent.Closed.Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.