Package org.apache.camel.spi
Interface RoutesLoader
-
- All Superinterfaces:
CamelContextAware
public interface RoutesLoader extends CamelContextAware
SPI for loadingRoutesBuilderfrom a list ofResource.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<RoutesBuilder>findRoutesBuilders(Collection<Resource> resources)FindRoutesBuilderfrom the give list ofResource.default Collection<RoutesBuilder>findRoutesBuilders(Resource... resources)FindRoutesBuilderfrom the give list ofResource.default voidloadRoutes(Collection<Resource> resources)default voidloadRoutes(Resource... resources)default Set<String>updateRoutes(Collection<Resource> resources)Loads or updates existingRoutesBuilderfrom the give list ofResourceinto the currentCamelContext.default Set<String>updateRoutes(Resource... resources)Loads or updates existingRoutesBuilderfrom the give list ofResourceinto the currentCamelContext.-
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
-
-
-
-
Field Detail
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadRoutes
default void loadRoutes(Collection<Resource> resources) throws Exception
- Parameters:
resources- the resources to be loaded.- Throws:
Exception
-
loadRoutes
default void loadRoutes(Resource... resources) throws Exception
- Parameters:
resources- the resources to be loaded.- Throws:
Exception
-
updateRoutes
default Set<String> updateRoutes(Resource... resources) throws Exception
Loads or updates existingRoutesBuilderfrom the give list ofResourceinto the currentCamelContext. If a route is loaded with a route id for an existing route, then the existing route is stopped and remove, so it can be updated.- Parameters:
resources- the resources to be loaded or updated.- Returns:
- route ids for the routes that was loaded or updated.
- Throws:
Exception
-
updateRoutes
default Set<String> updateRoutes(Collection<Resource> resources) throws Exception
Loads or updates existingRoutesBuilderfrom the give list ofResourceinto the currentCamelContext. If a route is loaded with a route id for an existing route, then the existing route is stopped and remove, so it can be updated.- Parameters:
resources- the resources to be loaded or updated.- Returns:
- route ids for the routes that was loaded or updated.
- Throws:
Exception
-
findRoutesBuilders
default Collection<RoutesBuilder> findRoutesBuilders(Resource... resources) throws Exception
FindRoutesBuilderfrom the give list ofResource.- Parameters:
resources- the resource to be loaded.- Returns:
- a collection of
RoutesBuilder - Throws:
Exception
-
findRoutesBuilders
Collection<RoutesBuilder> findRoutesBuilders(Collection<Resource> resources) throws Exception
FindRoutesBuilderfrom the give list ofResource.- Parameters:
resources- the resource to be loaded.- Returns:
- a collection
RoutesBuilder - Throws:
Exception
-
-