Interface UserDestinationResolver

All Known Implementing Classes:
DefaultUserDestinationResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface UserDestinationResolver
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.

Since:
4.0
Author:
Rossen Stoyanchev
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Resolve the given message with a user destination to one or more messages with actual destinations, one for each active user session.
  • Method Details

    • resolveDestination

      @Nullable 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 - the message to try to resolve
      Returns:
      0 or more target messages (one for each active session), or null if the source message does not contain a user destination.