org.springframework.messaging.simp.user

## Interface UserDestinationResolver

- All Known Implementing Classes:
    DefaultUserDestinationResolver

      public interface UserDestinationResolver

  A strategy for resolving a "user" destination and translating it to one or more actual destinations unique to the user's active session(s).

  For messages sent to a user, the destination must contain the name of the target user, The name, extracted from the destination, is used to look up the active user session(s), and then translate the destination accordingly.

  For SUBSCRIBE and UNSUBSCRIBE messages, the user is the user associated with the message. In other words the destination does not contain the user name.

  See the documentation on implementations for specific examples.

  Since:
    4.0
  Author:
    Rossen Stoyanchev
  See Also:
    `DefaultUserDestinationResolver`, `UserDestinationMessageHandler`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `UserDestinationResult` | `resolveDestination(Message<?> message)` Resolve the destination of the message to a set of actual target destinations.

- - ### Method Detail

    - #### resolveDestination

          UserDestinationResult resolveDestination(Message<?> message)

      Resolve the destination of the message to a set of actual target destinations.

      If the message is SUBSCRIBE/UNSUBSCRIBE, the returned set will contain a single translated target destination.

      If the message represents data being sent to a user, the returned set may contain multiple target destinations, one for each active user session.

      Parameters:
        `message` - the message with a user destination to be resolved
      Returns:
        the result of the resolution, or `null` if the resolution fails (e.g. not a user destination, or no user info available, etc)