Interface MessageMatcher<T>

All Known Implementing Classes:
AbstractMessageMatcherComposite, AndMessageMatcher, OrMessageMatcher, PathPatternMessageMatcher, SimpDestinationMessageMatcher, SimpMessageTypeMatcher

public interface MessageMatcher<T>
API for determining if a Message should be matched on.
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The result of matching against a Message contains the status, true or false, of the match and if present, any variables extracted from the match
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final MessageMatcher<Object>
    Matches every Message
  • Method Summary

    Modifier and Type
    Method
    Description
    matcher(org.springframework.messaging.Message<? extends T> message)
    Returns a MessageMatcher.MatchResult for this MessageMatcher.
    boolean
    matches(org.springframework.messaging.Message<? extends T> message)
    Returns true if the Message matches, else false
  • Field Details

  • Method Details

    • matches

      boolean matches(org.springframework.messaging.Message<? extends T> message)
      Returns true if the Message matches, else false
      Parameters:
      message - the Message to match on
      Returns:
      true if the Message matches, else false
    • matcher

      default MessageMatcher.MatchResult matcher(org.springframework.messaging.Message<? extends T> message)
      Returns a MessageMatcher.MatchResult for this MessageMatcher. The default implementation returns Collections.emptyMap() when MessageMatcher.MatchResult.getVariables() is invoked.
      Returns:
      the MatchResult from comparing this MessageMatcher against the Message
      Since:
      6.5