Top Description Methods
org.springframework.messaging.simp.user

public Interface SimpUserRegistry

Known Direct Implementers
org.springframework.messaging.simp.user.MultiServerUserRegistry
Imports
java.util.Set, org.springframework.lang.Nullable

A registry of currently connected users.
Author
Rossen Stoyanchev
Since
4.2

Method Summary

Modifier and TypeMethod and Description
public Set<SimpSubscription>

Returns:

a set of matching subscriptions, or an empty set if none
findSubscriptions
(SimpSubscriptionMatcher
the matcher to use
matcher
)

Find subscriptions with the given matcher.

public SimpUser

Returns:

the user, or null if not connected
getUser
(String
the name of the user to look up
userName
)

Get the user for the given name.

public int

Returns:

the number of connected users
getUserCount
()

Return the count of all connected users.

public Set<SimpUser>

Returns:

the connected users, or an empty set if none
getUsers
()

Return a snapshot of all connected users.

Method Detail

findSubscriptionsback to summary
public Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher)

Find subscriptions with the given matcher.

Parameters
matcher:SimpSubscriptionMatcher

the matcher to use

Returns:Set<SimpSubscription>

a set of matching subscriptions, or an empty set if none

getUserback to summary
public SimpUser getUser(String userName)

Get the user for the given name.

Parameters
userName:String

the name of the user to look up

Returns:SimpUser

the user, or null if not connected

Annotations
@Nullable
getUserCountback to summary
public int getUserCount()

Return the count of all connected users.

Returns:int

the number of connected users

Since
4.3.5
getUsersback to summary
public Set<SimpUser> getUsers()

Return a snapshot of all connected users.

The returned set is a copy and will not reflect further changes.

Returns:Set<SimpUser>

the connected users, or an empty set if none