Interface RoutesCollector

All Known Implementing Classes:
DefaultRoutesCollector

public interface RoutesCollector
Collects routes and rests from the various sources (like registry or opinionated classpath locations) and adds these into the Camel context.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<org.apache.camel.RoutesBuilder>
    collectRoutesFromDirectory(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
    Collects all RoutesBuilder from the given directory.
    Collection<org.apache.camel.RoutesBuilder>
    collectRoutesFromRegistry(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
    Collects the RoutesBuilder instances which was discovered from the Registry such as Spring or CDI bean containers.
    Collection<org.apache.camel.spi.Resource>
    findRouteResourcesFromDirectory(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
    Finds all routes as Resource from the given directory.
    boolean
    Whether to ignore route loading and compilation errors (use this with care!)
    void
    setIgnoreLoadingError(boolean ignoreLoadingError)
    Whether to ignore route loading and compilation errors (use this with care!)
  • Method Details

    • isIgnoreLoadingError

      boolean isIgnoreLoadingError()
      Whether to ignore route loading and compilation errors (use this with care!)
    • setIgnoreLoadingError

      void setIgnoreLoadingError(boolean ignoreLoadingError)
      Whether to ignore route loading and compilation errors (use this with care!)
    • collectRoutesFromRegistry

      Collection<org.apache.camel.RoutesBuilder> collectRoutesFromRegistry(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
      Collects the RoutesBuilder instances which was discovered from the Registry such as Spring or CDI bean containers.
      Parameters:
      camelContext - the Camel Context
      excludePattern - exclude pattern (see javaRoutesExcludePattern option)
      includePattern - include pattern (see javaRoutesIncludePattern option)
      Returns:
      the discovered routes or an empty list
    • collectRoutesFromDirectory

      Collection<org.apache.camel.RoutesBuilder> collectRoutesFromDirectory(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
      Collects all RoutesBuilder from the given directory.
      Parameters:
      camelContext - the Camel Context
      excludePattern - exclude pattern (see routesExcludePattern option)
      includePattern - include pattern (see routesIncludePattern option)
      Returns:
      the discovered RoutesBuilder or an empty collection
    • findRouteResourcesFromDirectory

      Collection<org.apache.camel.spi.Resource> findRouteResourcesFromDirectory(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern)
      Finds all routes as Resource from the given directory.
      Parameters:
      camelContext - the Camel Context
      excludePattern - exclude pattern (see routesExcludePattern option)
      includePattern - include pattern (see routesIncludePattern option)
      Returns:
      the discovered routes as Resource or an empty collection