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.
|
Set<SimpUser> |
getUsers()
Return a snapshot of all connected users.
|
public UserSessionRegistryAdapter(UserSessionRegistry registry)
public SimpUser getUser(String userName)
SimpUserRegistry
getUser
in interface SimpUserRegistry
userName
- the name of the user to look upnull
if not connectedpublic Set<SimpUser> getUsers()
SimpUserRegistry
getUsers
in interface SimpUserRegistry
public Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher)
SimpUserRegistry
findSubscriptions
in interface SimpUserRegistry
matcher
- the matcher to use