Package org.apache.myfaces.push.cdi
Class WebsocketScopeManager.AbstractScope
- java.lang.Object
-
- org.apache.myfaces.push.cdi.WebsocketScopeManager.AbstractScope
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
WebsocketScopeManager.AbstractUserScope
,WebsocketScopeManager.ApplicationScope
- Enclosing class:
- WebsocketScopeManager
public abstract static class WebsocketScopeManager.AbstractScope extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<WebsocketChannel>>
channelTokens
This map hold all tokens that are related to the current scope.
-
Constructor Summary
Constructors Constructor Description AbstractScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getChannelTokens(String channel)
<S extends Serializable>
List<String>getChannelTokens(String channel, S user)
boolean
isChannelAvailable(String channel)
Indicate if the channel mentioned is valid for view scope.void
registerWebsocketSession(String token, WebsocketChannelMetadata metadata)
-
-
-
Field Detail
-
channelTokens
protected Map<String,List<WebsocketChannel>> channelTokens
This map hold all tokens that are related to the current scope. This map use as key channel and as value channelTokens
-
-
Method Detail
-
registerWebsocketSession
public void registerWebsocketSession(String token, WebsocketChannelMetadata metadata)
-
isChannelAvailable
public boolean isChannelAvailable(String channel)
Indicate if the channel mentioned is valid for view scope. A channel is valid if there is at least one token that represents a valid connection to this channel.- Parameters:
channel
-- Returns:
-
getChannelTokens
public <S extends Serializable> List<String> getChannelTokens(String channel, S user)
-
-