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

public Interface UserDestinationResolver

Known Direct Implementers
org.springframework.messaging.simp.user.DefaultUserDestinationResolver
Annotations
@FunctionalInterface
Imports
org.springframework.lang.Nullable, org.springframework.messaging.Message

A strategy for resolving a "user" destination by translating it to one or more actual destinations one per active user session. When sending a message to a user destination, the destination must contain the user name so it may be extracted and used to look up the user sessions. When subscribing to a user destination, the destination does not have to contain the user's own name. We simply use the current session.

See implementation classes and the documentation for example destinations.

Author
Rossen Stoyanchev
Since
4.0
See Also
org.springframework.messaging.simp.user.DefaultUserDestinationResolver, UserDestinationMessageHandler

Method Summary

Modifier and TypeMethod and Description
public UserDestinationResult

Returns:

0 or more target messages (one for each active session), or null if the source message does not contain a user destination.
resolveDestination
(Message<?>
the message to try to resolve
message
)

Resolve the given message with a user destination to one or more messages with actual destinations, one for each active user session.

Method Detail

resolveDestinationback to summary
public UserDestinationResult resolveDestination(Message<?> message)

Resolve the given message with a user destination to one or more messages with actual destinations, one for each active user session.

Parameters
message:Message<?>

the message to try to resolve

Returns:UserDestinationResult

0 or more target messages (one for each active session), or null if the source message does not contain a user destination.

Annotations
@Nullable