MessageCondition to match the destination header of a Message
against one or more patterns through a RouteMatcher.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | LOOKUP_DESTINATION_HEADER
The name of the "lookup destination" header. |
| private final Set | |
| private final RouteMatcher |
| Access | Constructor and Description |
|---|---|
| public | DestinationPatternsMessageCondition(String...
the URL patterns to match to, or if 0 then always match patterns)Constructor with patterns only. |
| public | DestinationPatternsMessageCondition(String[]
the URL patterns to match to, or if 0 then always match patterns, PathMatcher the matcher)PathMatcher to useConstructor with patterns and a |
| public | DestinationPatternsMessageCondition(String[]
the URL patterns to match to, or if 0 then always match patterns, RouteMatcher the routeMatcher)RouteMatcher to useConstructor with patterns and a |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public DestinationPatternsMessageCondition | combine(DestinationPatternsMessageCondition
the condition to combine with other)Implements org.
|
| public int | compareTo(DestinationPatternsMessageCondition other, Message<?> message)
Implements org. |
| protected Collection | getContent()
Implements abstract org. null.
|
| public DestinationPatternsMessageCondition | Returns: the same instance if the condition contains no patterns; or a new condition with sorted matching patterns; ornull either if a destination can not be extracted or there is no matchthe message to match to message)Implements org. org..
|
| private Comparator | |
| public Set | |
| protected String | getToStringInfix()
Implements abstract org. |
| private boolean | |
| private static Set |
| LOOKUP_DESTINATION_HEADER | back to summary |
|---|---|
| public static final String LOOKUP_DESTINATION_HEADER The name of the "lookup destination" header. | |
| patterns | back to summary |
|---|---|
| private final Set<String> patterns | |
| routeMatcher | back to summary |
|---|---|
| private final RouteMatcher routeMatcher | |
| DestinationPatternsMessageCondition | back to summary |
|---|---|
| public DestinationPatternsMessageCondition(String... patterns) Constructor with patterns only. Creates and uses an instance of
Non-empty patterns that don't start with "/" are prepended with "/".
| |
| DestinationPatternsMessageCondition | back to summary |
|---|---|
| public DestinationPatternsMessageCondition(String[] patterns, PathMatcher matcher) Constructor with patterns and a
| |
| DestinationPatternsMessageCondition | back to summary |
|---|---|
| public DestinationPatternsMessageCondition(String[] patterns, RouteMatcher routeMatcher) Constructor with patterns and a
| |
| DestinationPatternsMessageCondition | back to summary |
|---|---|
| private DestinationPatternsMessageCondition(Set<String> patterns, RouteMatcher routeMatcher) | |
| combine | back to summary |
|---|---|
| public DestinationPatternsMessageCondition combine(DestinationPatternsMessageCondition other) Implements org. Returns a new instance with URL patterns from the current instance ("this") and the "other" instance as follows:
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(DestinationPatternsMessageCondition other, Message<?> message) Implements org. Compare the two conditions based on the destination patterns they contain.
Patterns are compared one at a time, from top to bottom via
It is assumed that both instances have been obtained via
| |
| getContent | back to summary |
|---|---|
| protected Collection Implements abstract org. Doc from org. Return the collection of objects the message condition is composed of
(e.g. destination patterns), never
| |
| getMatchingCondition | back to summary |
|---|---|
| public DestinationPatternsMessageCondition getMatchingCondition(Message<?> message) Implements org. Check if any of the patterns match the given Message destination and return an instance
that is guaranteed to contain matching patterns, sorted via
| |
| getPatternComparator | back to summary |
|---|---|
| private Comparator | |
| getPatterns | back to summary |
|---|---|
| public Set | |
| getToStringInfix | back to summary |
|---|---|
| protected String getToStringInfix() Implements abstract org. Doc from org. The notation to use when printing discrete items of content. For example " || " for URL patterns or " && " for param expressions.
| |
| matchPattern | back to summary |
|---|---|
| private boolean matchPattern(String pattern, Object destination) | |
| prependLeadingSlash | back to summary |
|---|---|
| private static Set | |