Package com.sun.faces.push
Class WebsocketUserManager
java.lang.Object
com.sun.faces.push.WebsocketUserManager
@ApplicationScoped public class WebsocketUserManager extends Object
This web socket user manager holds all web socket users registered by <f:websocket>.
- Since:
- 2.3
- Author:
- Bauke Scholtz
- See Also:
Push
-
Constructor Summary
Constructors Constructor Description WebsocketUserManager() -
Method Summary
Modifier and Type Method Description protected voidaddChannelId(String userId, String channel, String channelId)Add user channel ID associated with given session based user ID and channel name.protected voidderegister(Serializable user, String userId)Deregister application user associated with given user and session based user ID.protected Set<String>getChannelIds(Serializable user, String channel)Resolve the user-specific channel IDs associated with given user and channel name.protected SerializablegetUser(String channel, String channelId)Resolve the user associated with given channel name and ID.protected voidregister(Serializable user, String userId)Register application user based on given user and session based user ID.
-
Constructor Details
-
WebsocketUserManager
public WebsocketUserManager()
-
-
Method Details
-
register
Register application user based on given user and session based user ID.- Parameters:
user- The user.userId- The session based user ID.
-
addChannelId
Add user channel ID associated with given session based user ID and channel name.- Parameters:
userId- The session based user ID.channel- The channel name.channelId- The channel identifier.
-
getUser
Resolve the user associated with given channel name and ID.- Parameters:
channel- The channel name.channelId- The channel identifier.- Returns:
- The user associated with given channel name and ID.
-
getChannelIds
Resolve the user-specific channel IDs associated with given user and channel name.- Parameters:
user- The user.channel- The channel name.- Returns:
- The user-specific channel IDs associated with given user and channel name.
-
deregister
Deregister application user associated with given user and session based user ID.- Parameters:
user- The user.userId- The session based user ID.
-