Class DestinationPatternsMessageCondition

java.lang.Object
org.springframework.messaging.handler.AbstractMessageCondition<DestinationPatternsMessageCondition>
org.springframework.messaging.handler.DestinationPatternsMessageCondition
All Implemented Interfaces:
MessageCondition<DestinationPatternsMessageCondition>

public class DestinationPatternsMessageCondition extends AbstractMessageCondition<DestinationPatternsMessageCondition>
MessageCondition to match the destination header of a Message against one or more patterns through a RouteMatcher.
Since:
4.0
Author:
Rossen Stoyanchev
  • Field Details

    • LOOKUP_DESTINATION_HEADER

      public static final String LOOKUP_DESTINATION_HEADER
      The name of the "lookup destination" header.
      See Also:
  • Constructor Details

    • DestinationPatternsMessageCondition

      public DestinationPatternsMessageCondition(String... patterns)
      Constructor with patterns only. Creates and uses an instance of AntPathMatcher with default settings.

      Non-empty patterns that don't start with "/" are prepended with "/".

      Parameters:
      patterns - the URL patterns to match to, or if 0 then always match
    • DestinationPatternsMessageCondition

      public DestinationPatternsMessageCondition(String[] patterns, @Nullable PathMatcher matcher)
      Constructor with patterns and a PathMatcher instance.
      Parameters:
      patterns - the URL patterns to match to, or if 0 then always match
      matcher - the PathMatcher to use
    • DestinationPatternsMessageCondition

      public DestinationPatternsMessageCondition(String[] patterns, RouteMatcher routeMatcher)
      Constructor with patterns and a RouteMatcher instance.
      Parameters:
      patterns - the URL patterns to match to, or if 0 then always match
      routeMatcher - the RouteMatcher to use
      Since:
      5.2
  • Method Details