Package org.apache.camel.model
Class RouteFilters
java.lang.Object
org.apache.camel.model.RouteFilters
- All Implemented Interfaces:
Function<RouteDefinition,Boolean>
Used for filtering routes to only include routes matching a function.
-
Method Summary
Modifier and TypeMethodDescriptionapply(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 Details
-
filterByPattern
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
- Specified by:
applyin interfaceFunction<RouteDefinition,Boolean>
-