Package org.apache.camel.dsl.support
Class RouteBuilderLoaderSupport
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.RoutesBuilderLoaderSupport
org.apache.camel.dsl.support.RouteBuilderLoaderSupport
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.RoutesBuilderLoader
,org.apache.camel.StatefulService
,org.apache.camel.StaticService
,org.apache.camel.SuspendableService
- Direct Known Subclasses:
ExtendedRouteBuilderLoaderSupport
public abstract class RouteBuilderLoaderSupport
extends org.apache.camel.support.RoutesBuilderLoaderSupport
Base class for
RoutesBuilderLoader
implementations.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
Fields inherited from interface org.apache.camel.spi.RoutesBuilderLoader
FACTORY_PATH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompilePostProcessor
(org.apache.camel.spi.CompilePostProcessor preProcessor) Add a customCompilePostProcessor
to handle specific post-processing after compiling the source into a Java object.protected void
doBuild()
protected abstract org.apache.camel.builder.RouteBuilder
doLoadRouteBuilder
(org.apache.camel.spi.Resource resource) LoadsRoutesBuilder
fromResource
from the DSL implementation.protected void
doStart()
List
<org.apache.camel.spi.CompilePostProcessor> Gets the registeredCompilePostProcessor
.boolean
isSupportedExtension
(String extension) org.apache.camel.RoutesBuilder
loadRoutesBuilder
(org.apache.camel.spi.Resource resource) protected InputStream
resourceInputStream
(org.apache.camel.spi.Resource resource) Gets the input stream to the resourceMethods inherited from class org.apache.camel.support.RoutesBuilderLoaderSupport
getCamelContext, setCamelContext
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.RoutesBuilderLoader
preParseRoute
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
RouteBuilderLoaderSupport
-
-
Method Details
-
getSupportedExtension
-
isSupportedExtension
@ManagedOperation(description="Is the file extension supported by this route loader") public boolean isSupportedExtension(String extension) -
getCompilePostProcessors
Gets the registeredCompilePostProcessor
. -
addCompilePostProcessor
public void addCompilePostProcessor(org.apache.camel.spi.CompilePostProcessor preProcessor) Add a customCompilePostProcessor
to handle specific post-processing after compiling the source into a Java object. -
doBuild
- Overrides:
doBuild
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStart
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
loadRoutesBuilder
public org.apache.camel.RoutesBuilder loadRoutesBuilder(org.apache.camel.spi.Resource resource) throws Exception - Throws:
Exception
-
resourceInputStream
protected InputStream resourceInputStream(org.apache.camel.spi.Resource resource) throws IOException Gets the input stream to the resource- Parameters:
resource
- the resource- Returns:
- the input stream
- Throws:
IOException
-
doLoadRouteBuilder
protected abstract org.apache.camel.builder.RouteBuilder doLoadRouteBuilder(org.apache.camel.spi.Resource resource) throws Exception LoadsRoutesBuilder
fromResource
from the DSL implementation.- Parameters:
resource
- the resource to be loaded.- Returns:
- a
RoutesBuilder
- Throws:
Exception
-