CDI interface to send a message object to the push socket channel as identified by @Push.
This can be injected via @Push in any container managed artifact in WAR.
@Inject @Push private PushContext channelName;
For detailed usage instructions, see @Push javadoc.
Push
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME
The boolean context parameter name to explicitly enable web socket endpoint during startup. |
| public static final String | URI_PREFIX
The context-relative web socket URI prefix where the endpoint should listen on. |
| public static final String | WEBSOCKET_ENDPOINT_PORT_PARAM_NAME
The integer context parameter name to specify the websocket endpoint port when it's different from HTTP port. |
| Modifier and Type | Method and Description |
|---|---|
| public Set | Returns: The results of the send operation. If it returns an empty set, then there was no open web socket session associated with given socket channel. The returned futures will returnnull on Future#get() if
the message was successfully delivered and otherwise throw ExecutionException.The push message object. message)Send given message object to the push socket channel as identified by |
| public < The generic type of the user identifier. S extends Serializable> Set | Returns: The results of the send operation. If it returns an empty set, then there was no open web socket session associated with given socket channel and user. The returned futures will returnnull on
Future#get() if the message was successfully delivered and otherwise throw ExecutionException.The push message object. message, S The user to which the push message object must be delivered to. user)Send given message object to the push socket channel as identified by |
| public < The generic type of the user identifier. S extends Serializable> Map | Returns: The results of the send operation grouped by user. If it contains an empty set, then there was no open web socket session associated with given socket channel and user. The returned futures will returnnull on
Future#get() if the message was successfully delivered and otherwise throw ExecutionException.The push message object. message, Collection<S> The users to which the push message object must be delivered to. users)Send given message object to the push socket channel as identified by |
| ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME | back to summary |
|---|---|
| public static final String ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME The boolean context parameter name to explicitly enable web socket endpoint during startup. | |
| URI_PREFIX | back to summary |
|---|---|
| public static final String URI_PREFIX The context-relative web socket URI prefix where the endpoint should listen on. | |
| WEBSOCKET_ENDPOINT_PORT_PARAM_NAME | back to summary |
|---|---|
| public static final String WEBSOCKET_ENDPOINT_PORT_PARAM_NAME The integer context parameter name to specify the websocket endpoint port when it's different from HTTP port. | |
| send | back to summary |
|---|---|
| public Set Send given message object to the push socket channel as identified by
| |
| send | back to summary |
|---|---|
| public <S extends Serializable> Set Send given message object to the push socket channel as identified by
| |
| send | back to summary |
|---|---|
| public <S extends Serializable> Map Send given message object to the push socket channel as identified by
| |