Package org.apache.myfaces.push.cdi
Class WebsocketScopeManager.ViewScope
java.lang.Object
org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractScope
org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractUserScope
org.apache.myfaces.push.cdi.WebsocketScopeManager.ViewScope
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- WebsocketScopeManager
@ViewScoped
public static class WebsocketScopeManager.ViewScope
extends WebsocketScopeManager.AbstractUserScope
implements Serializable
This map hold all tokens related to the current view. The reason to do this is the connections must follow
 the same rules the view has, so if a view is disposed, all related websocket sessions must be disposed too
 on the server, and in that way we can avoid memory leaks. This bean has a PreDestroy annotation to dispose all
 related websocket sessions.
 
 This map also enforces a rule that there is only one websocket token pero combination of channel, scope and user
 per view. In that way, the token can be used to identify on the client if a websocket initialization request
 can share a websocket connection or not, simplifying code design.
- See Also:
- 
Field SummaryFields inherited from class org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractUserScopetokensFields inherited from class org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractScopechannelTokens
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractUserScopegetChannelToken, getUserFromChannelToken, isTokenValid, registerTokenMethods inherited from class org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractScopegetChannelTokens, getChannelTokens, isChannelAvailable, registerWebsocketSession
- 
Constructor Details- 
ViewScopepublic ViewScope()
 
- 
- 
Method Details- 
destroy@PreDestroy public void destroy()
 
-