Package org.apache.camel.spi
Interface ExtendedRoutesBuilderLoader
-
- All Superinterfaces:
AutoCloseable
,CamelContextAware
,RoutesBuilderLoader
,Service
,StaticService
public interface ExtendedRoutesBuilderLoader extends RoutesBuilderLoader
An extendedRoutesBuilderLoader
that 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 String
getCompileDirectory()
boolean
isCompileLoadFirst()
Collection<RoutesBuilder>
loadRoutesBuilders(Collection<Resource> resources)
LoadsRoutesBuilder
from multipleResource
s.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).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).-
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
LoadsRoutesBuilder
from multipleResource
s.- Parameters:
resources
- the resources to be loaded.- Returns:
- a set of loaded
RoutesBuilder
s - 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.
-
-