Package org.apache.camel.processor
Class DynamicRouter
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.AsyncProcessorSupport
org.apache.camel.processor.RoutingSlip
org.apache.camel.processor.DynamicRouter
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncProcessor
,org.apache.camel.Processor
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
,org.apache.camel.spi.RouteIdAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
,org.apache.camel.Traceable
Implements a Dynamic Router pattern where the
destination(s) is computed at runtime.
This implementation builds on top of
RoutingSlip
which contains the most logic.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.processor.RoutingSlip
RoutingSlip.RoutingSlipIterator
-
Field Summary
Fields inherited from class org.apache.camel.processor.RoutingSlip
cacheSize, camelContext, errorHandler, expression, header, id, ignoreInvalidEndpoints, producerCache, routeId, uriDelimiter
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
-
Constructor Summary
ConstructorDescriptionDynamicRouter
(org.apache.camel.CamelContext camelContext) DynamicRouter
(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String uriDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionprotected RoutingSlip.RoutingSlipIterator
createRoutingSlipIterator
(org.apache.camel.Exchange exchange, org.apache.camel.Expression expression) Creates the route slip iterator to be used.Methods inherited from class org.apache.camel.processor.RoutingSlip
createErrorHandler, doShutdown, doStart, doStop, getCacheSize, getEndpointUtilizationStatistics, getErrorHandler, getExistingEndpoint, getExpression, getId, getRouteId, getTraceLabel, getUriDelimiter, isIgnoreInvalidEndpoints, newRoutingSlipProcessorForErrorHandler, prepareExchangeForRoutingSlip, prepareRecipient, process, processExchange, resolveEndpoint, setCacheSize, setDelimiter, setErrorHandler, setId, setIgnoreInvalidEndpoints, setRouteId, toString
Methods inherited from class org.apache.camel.support.AsyncProcessorSupport
process, processAsync
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, 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, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.IdAware
setGeneratedId
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
-
DynamicRouter
public DynamicRouter(org.apache.camel.CamelContext camelContext) -
DynamicRouter
public DynamicRouter(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String uriDelimiter)
-
-
Method Details
-
createRoutingSlipIterator
protected RoutingSlip.RoutingSlipIterator createRoutingSlipIterator(org.apache.camel.Exchange exchange, org.apache.camel.Expression expression) throws Exception Description copied from class:RoutingSlip
Creates the route slip iterator to be used.- Overrides:
createRoutingSlipIterator
in classRoutingSlip
- Parameters:
exchange
- the exchangeexpression
- the expression- Returns:
- the iterator, should never be null
- Throws:
Exception
-