Package org.apache.camel.spi
Interface ExtendedRoutesBuilderLoader
-
- All Superinterfaces:
AutoCloseable,CamelContextAware,RoutesBuilderLoader,Service,StaticService
public interface ExtendedRoutesBuilderLoader extends RoutesBuilderLoader
An extendedRoutesBuilderLoaderthat is capable of loading from multiple resources in one unit (such as compiling them together).
-
-
Field Summary
-
Fields inherited from interface org.apache.camel.spi.RoutesBuilderLoader
FACTORY_PATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetCompileDirectory()booleanisCompileLoadFirst()Collection<RoutesBuilder>loadRoutesBuilders(Collection<Resource> resources)LoadsRoutesBuilderfrom multipleResources.voidsetCompileDirectory(String compileDirectory)Directory to use for saving runtime compiled Camel routes to class files, when using camel-java-joor-dsl as Java DSL (such as when using Camel K with Java source routes).voidsetCompileLoadFirst(boolean compileLoadFirst)Whether to load preexisting compiled Camel routes class files, when using camel-java-joor-dsl as Java DSL (such as when using Camel K with Java source routes).-
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
-
Methods inherited from interface org.apache.camel.spi.RoutesBuilderLoader
getSupportedExtension, loadRoutesBuilder, preParseRoute
-
-
-
-
Method Detail
-
loadRoutesBuilders
Collection<RoutesBuilder> loadRoutesBuilders(Collection<Resource> resources) throws Exception
LoadsRoutesBuilderfrom multipleResources.- Parameters:
resources- the resources to be loaded.- Returns:
- a set of loaded
RoutesBuilders - Throws:
Exception
-
getCompileDirectory
String getCompileDirectory()
-
setCompileDirectory
void setCompileDirectory(String compileDirectory)
Directory to use for saving runtime compiled Camel routes to class files, when using camel-java-joor-dsl as Java DSL (such as when using Camel K with Java source routes). Camel will compile to in-memory only by default. Specifying this option, allows Camel to persist the compiled class to disk. And when starting the application again the routes are loaded from the pre-compiled class files instead of re-compiling again.
-
isCompileLoadFirst
boolean isCompileLoadFirst()
-
setCompileLoadFirst
void setCompileLoadFirst(boolean compileLoadFirst)
Whether to load preexisting compiled Camel routes class files, when using camel-java-joor-dsl as Java DSL (such as when using Camel K with Java source routes). If enabled then Camel will look in the routes compile directory if a compiled Java route already exists and load its bytecode instead of runtime compiling from its java source file.
-
-