Package org.apache.camel.main
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 TypeMethodDescriptionCollection<org.apache.camel.RoutesBuilder>collectRoutesFromDirectory(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern) Collects allRoutesBuilderfrom the given directory.Collection<org.apache.camel.RoutesBuilder>collectRoutesFromRegistry(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern) Collects theRoutesBuilderinstances which was discovered from theRegistrysuch 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 asResourcefrom the given directory.
-
Method Details
-
collectRoutesFromRegistry
Collection<org.apache.camel.RoutesBuilder> collectRoutesFromRegistry(org.apache.camel.CamelContext camelContext, String excludePattern, String includePattern) Collects theRoutesBuilderinstances which was discovered from theRegistrysuch as Spring or CDI bean containers.- Parameters:
camelContext- the Camel ContextexcludePattern- 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 allRoutesBuilderfrom the given directory.- Parameters:
camelContext- the Camel ContextexcludePattern- 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 asResourcefrom the given directory.- Parameters:
camelContext- the Camel ContextexcludePattern- exclude pattern (see routesExcludePattern option)includePattern- include pattern (see routesIncludePattern option)- Returns:
- the discovered routes as
Resourceor an empty collection
-