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
public class DynamicRouter extends RoutingSlip
Implements a Dynamic Router pattern where the destination(s) is computed at runtime. This implementation builds on top ofRoutingSlip
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
-
-
Constructor Summary
Constructors Constructor Description DynamicRouter(org.apache.camel.CamelContext camelContext)
DynamicRouter(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String uriDelimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.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
-
-
-
-
Constructor Detail
-
DynamicRouter
public DynamicRouter(org.apache.camel.CamelContext camelContext)
-
DynamicRouter
public DynamicRouter(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String uriDelimiter)
-
-
Method Detail
-
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
-
-