org.springframework.messaging.simp.user

## Class UserDestinationResult

- java.lang.Object
- - org.springframework.messaging.simp.user.UserDestinationResult

-     public class UserDestinationResult
      extends Object

  A simple container for the result of parsing and translating a "user" destination in some source message into a set of actual target destinations by calling `UserDestinationResolver`.
  Since:
    4.0.2
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserDestinationResult(String sourceDestination, Set<String> targetDestinations, String subscribeDestination, String user)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getSourceDestination()` The "user" destination as found in the headers of the source message.
    `String` | `getSubscribeDestination()` The canonical form of the user destination as would be required to subscribe.
    `Set<String>` | `getTargetDestinations()` The result of parsing the source destination and translating it into a set of actual target destinations to use.
    `String` | `getUser()` The user associated with the user destination.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UserDestinationResult

          public UserDestinationResult(String sourceDestination,
                                       Set<String> targetDestinations,
                                       String subscribeDestination,
                                       String user)

  - ### Method Detail

    - #### getSourceDestination

          public String getSourceDestination()

      The "user" destination as found in the headers of the source message.
      Returns:
        a destination, never `null`

    - #### getTargetDestinations

          public Set<String> getTargetDestinations()

      The result of parsing the source destination and translating it into a set of actual target destinations to use.
      Returns:
        a set of destination values, possibly an empty set

    - #### getSubscribeDestination

          public String getSubscribeDestination()

      The canonical form of the user destination as would be required to subscribe. This may be useful to ensure that messages received by clients contain the original destination they used to subscribe.
      Returns:
        a destination, never `null`

    - #### getUser

          public String getUser()

      The user associated with the user destination.
      Returns:
        the user name, never `null`