public final class RouteFilters extends Object implements Function<RouteDefinition,Boolean>
Modifier and Type | Method and Description |
---|---|
Boolean |
apply(RouteDefinition route) |
static Function<RouteDefinition,Boolean> |
filterByPattern(String include,
String exclude)
Used for filtering routes routes matching the given pattern, which
follows the following rules: - Match by route id - Match by route input
endpoint uri The matching is using exact match, by wildcard and regular
expression as documented by
PatternHelper.matchPattern(String, String) . |
public static Function<RouteDefinition,Boolean> filterByPattern(String include, String exclude)
PatternHelper.matchPattern(String, String)
. For example to only
include routes which starts with foo in their route id's, use:
include=foo* And to exclude routes which starts from JMS endpoints,
use: exclude=jms:* Multiple patterns can be separated by comma, for
example to exclude both foo and bar routes, use:
exclude=foo*,bar* Exclude takes precedence over include.include
- the include patternexclude
- the exclude patternpublic Boolean apply(RouteDefinition route)
apply
in interface Function<RouteDefinition,Boolean>
Apache Camel