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 Details

    • 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 by 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.
      Parameters:
      include - the include pattern
      exclude - the exclude pattern
    • apply

      public Boolean apply(RouteDefinition route)
      Specified by:
      apply in interface Function<RouteDefinition,Boolean>