Package org.apache.camel.processor
Class RecipientList
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.AsyncProcessorSupport
-
- org.apache.camel.processor.RecipientList
-
- 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
public class RecipientList extends org.apache.camel.support.AsyncProcessorSupport implements org.apache.camel.spi.IdAware, org.apache.camel.spi.RouteIdAware
Implements a dynamic Recipient List pattern where the list of actual endpoints to send a message exchange to are dependent on some dynamic expression.
-
-
Constructor Summary
Constructors Constructor Description RecipientList(org.apache.camel.CamelContext camelContext)
RecipientList(org.apache.camel.CamelContext camelContext, String delimiter)
RecipientList(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression)
RecipientList(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String delimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doShutdown()
protected void
doStart()
protected void
doStop()
org.apache.camel.AggregationStrategy
getAggregationStrategy()
int
getCacheSize()
String
getDelimiter()
org.apache.camel.spi.EndpointUtilizationStatistics
getEndpointUtilizationStatistics()
ExecutorService
getExecutorService()
org.apache.camel.Expression
getExpression()
String
getId()
org.apache.camel.Processor
getOnPrepare()
String
getRouteId()
long
getTimeout()
boolean
isIgnoreInvalidEndpoints()
boolean
isParallelAggregate()
boolean
isParallelProcessing()
boolean
isShareUnitOfWork()
boolean
isShutdownExecutorService()
boolean
isStopOnAggregateException()
boolean
isStopOnException()
boolean
isStreaming()
org.apache.camel.Processor
newPipeline(org.apache.camel.CamelContext camelContext, Collection<org.apache.camel.Processor> processors)
boolean
process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
boolean
sendToRecipientList(org.apache.camel.Exchange exchange, Object recipientList, org.apache.camel.AsyncCallback callback)
Sends the given exchange to the recipient listvoid
setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
void
setCacheSize(int cacheSize)
void
setExecutorService(ExecutorService executorService)
void
setId(String id)
void
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
void
setOnPrepare(org.apache.camel.Processor onPrepare)
void
setParallelAggregate(boolean parallelAggregate)
void
setParallelProcessing(boolean parallelProcessing)
void
setRouteId(String routeId)
void
setShareUnitOfWork(boolean shareUnitOfWork)
void
setShutdownExecutorService(boolean shutdownExecutorService)
void
setStopOnAggregateException(boolean stopOnAggregateException)
void
setStopOnException(boolean stopOnException)
void
setStreaming(boolean streaming)
void
setTimeout(long timeout)
String
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
-
RecipientList
public RecipientList(org.apache.camel.CamelContext camelContext)
-
RecipientList
public RecipientList(org.apache.camel.CamelContext camelContext, String delimiter)
-
RecipientList
public RecipientList(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression)
-
RecipientList
public RecipientList(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String delimiter)
-
-
Method Detail
-
newPipeline
public org.apache.camel.Processor newPipeline(org.apache.camel.CamelContext camelContext, Collection<org.apache.camel.Processor> processors)
-
getId
public String getId()
- Specified by:
getId
in interfaceorg.apache.camel.spi.HasId
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceorg.apache.camel.spi.IdAware
-
getRouteId
public String getRouteId()
- Specified by:
getRouteId
in interfaceorg.apache.camel.spi.RouteIdAware
-
setRouteId
public void setRouteId(String routeId)
- Specified by:
setRouteId
in interfaceorg.apache.camel.spi.RouteIdAware
-
process
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
- Specified by:
process
in interfaceorg.apache.camel.AsyncProcessor
-
sendToRecipientList
public boolean sendToRecipientList(org.apache.camel.Exchange exchange, Object recipientList, org.apache.camel.AsyncCallback callback)
Sends the given exchange to the recipient list
-
getEndpointUtilizationStatistics
public org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.AsyncProcessorSupport
- Throws:
Exception
-
doStop
protected void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.AsyncProcessorSupport
- Throws:
Exception
-
doShutdown
protected void doShutdown() throws Exception
- Overrides:
doShutdown
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
getExpression
public org.apache.camel.Expression getExpression()
-
getDelimiter
public String getDelimiter()
-
isStreaming
public boolean isStreaming()
-
setStreaming
public void setStreaming(boolean streaming)
-
isIgnoreInvalidEndpoints
public boolean isIgnoreInvalidEndpoints()
-
setIgnoreInvalidEndpoints
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
-
isParallelProcessing
public boolean isParallelProcessing()
-
setParallelProcessing
public void setParallelProcessing(boolean parallelProcessing)
-
isParallelAggregate
public boolean isParallelAggregate()
-
setParallelAggregate
public void setParallelAggregate(boolean parallelAggregate)
-
isStopOnAggregateException
public boolean isStopOnAggregateException()
-
setStopOnAggregateException
public void setStopOnAggregateException(boolean stopOnAggregateException)
-
isStopOnException
public boolean isStopOnException()
-
setStopOnException
public void setStopOnException(boolean stopOnException)
-
getExecutorService
public ExecutorService getExecutorService()
-
setExecutorService
public void setExecutorService(ExecutorService executorService)
-
isShutdownExecutorService
public boolean isShutdownExecutorService()
-
setShutdownExecutorService
public void setShutdownExecutorService(boolean shutdownExecutorService)
-
getAggregationStrategy
public org.apache.camel.AggregationStrategy getAggregationStrategy()
-
setAggregationStrategy
public void setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
-
getTimeout
public long getTimeout()
-
setTimeout
public void setTimeout(long timeout)
-
getOnPrepare
public org.apache.camel.Processor getOnPrepare()
-
setOnPrepare
public void setOnPrepare(org.apache.camel.Processor onPrepare)
-
isShareUnitOfWork
public boolean isShareUnitOfWork()
-
setShareUnitOfWork
public void setShareUnitOfWork(boolean shareUnitOfWork)
-
getCacheSize
public int getCacheSize()
-
setCacheSize
public void setCacheSize(int cacheSize)
-
-