This web socket channel manager holds all application and session scoped web socket channel identifiers registered by
<f:websocket>.
Push
| Modifier and Type | Class and Description |
|---|---|
| private static enum | |
| public static class | WebsocketChannelManager.ViewScope
This helps the web socket channel manager to hold view scoped web socket channel identifiers registered by
|
| Modifier and Type | Field and Description |
|---|---|
| private static final ConcurrentMap | |
| pack-priv static final Map | |
| private static final String | |
| private static final String | |
| private static final int | |
| private static final int | |
| private static final int | |
| pack-priv static final int | |
| private static final int | |
| private static final long | |
| private final ConcurrentMap | |
| private final ConcurrentMap | |
| private WebsocketSessionManager | |
| private WebsocketUserManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | deregisterSessionScope()
When current session scope is about to be destroyed, deregister all session scope channels and explicitly close any open web sockets associated with it to avoid stale websockets. |
| pack-priv static String | |
| pack-priv static Map | |
| pack-priv static Map | |
| private void | |
| public String | Returns: The web socket URL.The involved faces context. context, String The web socket channel. channel, String The web socket scope. Supported values are scope, Serializable application, session and
view, case insensitive. If null, the default is application.The user object representing the owner of the given channel. If not user)null, then scope
may not be application.Register given channel on given scope and returns the web socket channel identifier. |
| private String | register(FacesContext context, Serializable user, String channel, Map<String, String> targetScope, Map<String, String>... otherScopes)
|
| private void |
| APPLICATION_SCOPE | back to summary |
|---|---|
| private static final ConcurrentMap<String, String> APPLICATION_SCOPE | |
| EMPTY_SCOPE | back to summary |
|---|---|
| pack-priv static final Map<String, String> EMPTY_SCOPE | |
| ERROR_DUPLICATE_CHANNEL | back to summary |
|---|---|
| private static final String ERROR_DUPLICATE_CHANNEL | |
| ERROR_INVALID_SCOPE | back to summary |
|---|---|
| private static final String ERROR_INVALID_SCOPE | |
| ESTIMATED_CHANNELS_PER_APPLICATION | back to summary |
|---|---|
| private static final int ESTIMATED_CHANNELS_PER_APPLICATION | |
| ESTIMATED_CHANNELS_PER_SESSION | back to summary |
|---|---|
| private static final int ESTIMATED_CHANNELS_PER_SESSION | |
| ESTIMATED_CHANNELS_PER_VIEW | back to summary |
|---|---|
| private static final int ESTIMATED_CHANNELS_PER_VIEW | |
| ESTIMATED_TOTAL_CHANNELS | back to summary |
|---|---|
| pack-priv static final int ESTIMATED_TOTAL_CHANNELS | |
| ESTIMATED_USERS_PER_SESSION | back to summary |
|---|---|
| private static final int ESTIMATED_USERS_PER_SESSION | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| sessionScope | back to summary |
|---|---|
| private final ConcurrentMap<String, String> sessionScope | |
| sessionUsers | back to summary |
|---|---|
| private final ConcurrentMap<Serializable, String> sessionUsers | |
| socketSessions | back to summary |
|---|---|
| private WebsocketSessionManager socketSessions
| |
| socketUsers | back to summary |
|---|---|
| private WebsocketUserManager socketUsers
| |
| WebsocketChannelManager | back to summary |
|---|---|
| public WebsocketChannelManager() | |
| deregisterSessionScope | back to summary |
|---|---|
| protected void deregisterSessionScope() When current session scope is about to be destroyed, deregister all session scope channels and explicitly close any open web sockets associated with it to avoid stale websockets. If any, also deregister session users.
| |
| getChannelId | back to summary |
|---|---|
| pack-priv static String getChannelId(String channel, Map<String, String> sessionScope, Map<String, String> viewScope) For internal usage only. This makes it possible to resolve the session and view scope channel ID during push send
time in | |
| getSessionScope | back to summary |
|---|---|
| pack-priv static Map For internal usage only. This makes it possible to remember session scope channel IDs during injection time of
| |
| getViewScope | back to summary |
|---|---|
| pack-priv static Map For internal usage only. This makes it possible to remember view scope channel IDs during injection time of
| |
| readObject | back to summary |
|---|---|
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException
| |
| register | back to summary |
|---|---|
| public String register(FacesContext context, String channel, String scope, Serializable user) Register given channel on given scope and returns the web socket channel identifier.
| |
| register | back to summary |
|---|---|
private String register(FacesContext context, Serializable user, String channel, Map<String, String> targetScope, Map<String, String>... otherScopes)
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream output) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| public static final WebsocketChannelManager. | |
| public static final WebsocketChannelManager. | |
| public static final WebsocketChannelManager. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static WebsocketChannelManager. | |
| public static WebsocketChannelManager. | |
| public static WebsocketChannelManager. |
| APPLICATION | back to summary |
|---|---|
| public static final WebsocketChannelManager. | |
| SESSION | back to summary |
|---|---|
| public static final WebsocketChannelManager. | |
| VIEW | back to summary |
|---|---|
| public static final WebsocketChannelManager. | |
| Scope | back to summary |
|---|---|
| private Scope() | |
| of | back to summary |
|---|---|
| pack-priv static WebsocketChannelManager. | |
| valueOf | back to summary |
|---|---|
| public static WebsocketChannelManager. | |
| values | back to summary |
|---|---|
| public static WebsocketChannelManager. | |
<f:websocket>.
WebsocketChannelManager
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | deregisterViewScope()
When current view scope is about to be destroyed, deregister all view scope channels and explicitly close any open web sockets associated with it to avoid stale websockets. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| viewScope | back to summary |
|---|---|
| private ConcurrentMap<String, String> viewScope | |
| ViewScope | back to summary |
|---|---|
| public ViewScope() | |
| deregisterViewScope | back to summary |
|---|---|
| protected void deregisterViewScope() When current view scope is about to be destroyed, deregister all view scope channels and explicitly close any open web sockets associated with it to avoid stale websockets.
| |