Class UserDestinationResult
java.lang.Object
org.springframework.messaging.simp.user.UserDestinationResult
Contains the result from parsing a "user" destination from a source message
 and translating it to target destinations (one per active user session).
- Since:
- 4.0.2
- Author:
- Rossen Stoyanchev
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionUserDestinationResult(String sourceDestination, Set<String> targetDestinations, String subscribeDestination, @Nullable String user) Main constructor.UserDestinationResult(String sourceDestination, Set<String> targetDestinations, String subscribeDestination, @Nullable String user, @Nullable Set<String> sessionIds) Additional constructor with the session id for each targetDestination.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the session id for the targetDestination.The "user" destination from the source message.The user destination in the form expected when a client subscribes, for example, "/user/queue/position-updates".The target destinations that the source destination was translated to, one per active user session, for example, "/queue/position-updates-useri9oqdfzo".getUser()The user for this user destination.toString()
- 
Constructor Details- 
UserDestinationResultpublic UserDestinationResult(String sourceDestination, Set<String> targetDestinations, String subscribeDestination, @Nullable String user) Main constructor.
- 
UserDestinationResultpublic UserDestinationResult(String sourceDestination, Set<String> targetDestinations, String subscribeDestination, @Nullable String user, @Nullable Set<String> sessionIds) Additional constructor with the session id for each targetDestination.- Since:
- 6.1
 
 
- 
- 
Method Details- 
getSourceDestinationThe "user" destination from the source message. This may look like "/user/queue/position-updates" when subscribing or "/user/{username}/queue/position-updates" when sending a message.- Returns:
- the "user" destination, never null.
 
- 
getTargetDestinationsThe target destinations that the source destination was translated to, one per active user session, for example, "/queue/position-updates-useri9oqdfzo".- Returns:
- the target destinations, never nullbut possibly an empty set if there are no active sessions for the user.
 
- 
getSubscribeDestinationThe user destination in the form expected when a client subscribes, for example, "/user/queue/position-updates".- Returns:
- the subscribe form of the "user" destination, never null.
 
- 
getUserThe user for this user destination.- Returns:
- the user name or nullif we have a session id only such as when the user is not authenticated; in such cases it is possible to use sessionId in place of a user name thus removing the need for a user-to-session lookup viaSimpUserRegistry.
 
- 
getSessionIdsReturn the session id for the targetDestination.
- 
toString
 
-