Package org.apache.myfaces.push.cdi
Class WebsocketApplicationBean
- java.lang.Object
-
- org.apache.myfaces.push.cdi.WebsocketApplicationBean
-
@ApplicationScoped public class WebsocketApplicationBean extends Object
-
-
Constructor Summary
Constructors Constructor Description WebsocketApplicationBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getChannelTokensFor(String channel)
<S extends Serializable>
List<String>getChannelTokensFor(String channel, S user)
boolean
isChannelAvailable(String channel)
Indicate if the channel mentioned is valid for view scope.void
registerWebsocketSession(String token, WebsocketChannelMetadata metadata)
-
-
-
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:
-
getChannelTokensFor
public <S extends Serializable> List<String> getChannelTokensFor(String channel, S user)
-
-