public class UserSessionRegistryAdapter extends Object implements SimpUserRegistry
UserSessionRegistry, which is deprecated in
favor of SimpUserRegistry, to be used as a SimpUserRegistry.
Due to the more limited information available, methods such as
getUsers() and findSubscriptions(org.springframework.messaging.simp.user.SimpSubscriptionMatcher) are not supported.
As of 4.2, this adapter is used only in applications that explicitly
register a custom UserSessionRegistry bean by overriding
AbstractMessageBrokerConfiguration.userSessionRegistry().
| Constructor and Description |
|---|
UserSessionRegistryAdapter(UserSessionRegistry registry) |
| Modifier and Type | Method and 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.
|
public UserSessionRegistryAdapter(UserSessionRegistry registry)
public SimpUser getUser(String userName)
SimpUserRegistrygetUser in interface SimpUserRegistryuserName - the name of the user to look upnull if not connectedpublic Set<SimpUser> getUsers()
SimpUserRegistryThe returned set is a copy and will not reflect further changes.
getUsers in interface SimpUserRegistrypublic int getUserCount()
SimpUserRegistrygetUserCount in interface SimpUserRegistrypublic Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher)
SimpUserRegistryfindSubscriptions in interface SimpUserRegistrymatcher - the matcher to use