Interface SimpUserRegistry
- All Known Implementing Classes:
DefaultSimpUserRegistry
,MultiServerUserRegistry
,UserSessionRegistryAdapter
public interface SimpUserRegistry
A registry of currently connected users.- Since:
- 4.2
- Author:
- Rossen Stoyanchev
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<SimpSubscription>
findSubscriptions(SimpSubscriptionMatcher matcher)
Find subscriptions with the given matcher.SimpUser
getUser(String userName)
Get the user for the given name.int
getUserCount()
Return the count of all connected users.Set<SimpUser>
getUsers()
Return a snapshot of all connected users.
Method Detail
getUser
SimpUser getUser(String userName)
Get the user for the given name.- Parameters:
userName
- the name of the user to look up- Returns:
- the user, or
null
if not connected
getUsers
Set<SimpUser> getUsers()
Return a snapshot of all connected users.The returned set is a copy and will not reflect further changes.
- Returns:
- the connected users, or an empty set if none
getUserCount
int getUserCount()
Return the count of all connected users.- Returns:
- the number of connected users
- Since:
- 4.3.5
findSubscriptions
Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher)
Find subscriptions with the given matcher.- Parameters:
matcher
- the matcher to use- Returns:
- a set of matching subscriptions, or an empty set if none