Package org.apache.camel.model
Class RouteFilters
- java.lang.Object
-
- org.apache.camel.model.RouteFilters
-
- All Implemented Interfaces:
Function<RouteDefinition,Boolean>
public final class RouteFilters extends Object implements Function<RouteDefinition,Boolean>
Used for filtering routes to only include routes matching a function.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleanapply(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 byPatternHelper.matchPattern(String, String).
-
-
-
Method Detail
-
filterByPattern
public 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 byPatternHelper.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.- Parameters:
include- the include patternexclude- the exclude pattern
-
apply
public Boolean apply(RouteDefinition route)
- Specified by:
applyin interfaceFunction<RouteDefinition,Boolean>
-
-