public class RecipientList extends ServiceSupport implements AsyncProcessor, IdAware
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
RecipientList(CamelContext camelContext) |
RecipientList(CamelContext camelContext,
Expression expression) |
RecipientList(CamelContext camelContext,
Expression expression,
String delimiter) |
RecipientList(CamelContext camelContext,
String delimiter) |
Modifier and Type | Method and Description |
---|---|
protected void |
doShutdown()
Implementations override this method to perform customized shutdown.
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
AggregationStrategy |
getAggregationStrategy() |
int |
getCacheSize() |
String |
getDelimiter() |
EndpointUtilizationStatistics |
getEndpointUtilizationStatistics() |
ExecutorService |
getExecutorService() |
Expression |
getExpression() |
String |
getId()
Returns the id
|
Processor |
getOnPrepare() |
long |
getTimeout() |
boolean |
isIgnoreInvalidEndpoints() |
boolean |
isParallelAggregate() |
boolean |
isParallelProcessing() |
boolean |
isShareUnitOfWork() |
boolean |
isShutdownExecutorService() |
boolean |
isStopOnAggregateException() |
boolean |
isStopOnException() |
boolean |
isStreaming() |
void |
process(Exchange exchange)
Processes the message exchange
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange.
|
protected Endpoint |
resolveEndpoint(Exchange exchange,
Object recipient) |
boolean |
sendToRecipientList(Exchange exchange,
Object recipientList,
AsyncCallback callback)
Sends the given exchange to the recipient list
|
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy) |
void |
setCacheSize(int cacheSize) |
void |
setExecutorService(ExecutorService executorService) |
void |
setId(String id)
Sets the id
|
void |
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints) |
void |
setOnPrepare(Processor onPrepare) |
void |
setParallelAggregate(boolean parallelAggregate) |
void |
setParallelProcessing(boolean parallelProcessing) |
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() |
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public RecipientList(CamelContext camelContext)
public RecipientList(CamelContext camelContext, String delimiter)
public RecipientList(CamelContext camelContext, Expression expression)
public RecipientList(CamelContext camelContext, Expression expression, String delimiter)
public void process(Exchange exchange) throws Exception
Processor
public boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception
would be set on the Exchange
.process
in interface AsyncProcessor
exchange
- the message exchangecallback
- the AsyncCallback
will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.public boolean sendToRecipientList(Exchange exchange, Object recipientList, AsyncCallback callback)
protected Endpoint resolveEndpoint(Exchange exchange, Object recipient)
public EndpointUtilizationStatistics getEndpointUtilizationStatistics()
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
protected void doShutdown() throws Exception
ServiceSupport
doShutdown
in class ServiceSupport
Exception
public Expression getExpression()
public String getDelimiter()
public boolean isStreaming()
public void setStreaming(boolean streaming)
public boolean isIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
public boolean isParallelProcessing()
public void setParallelProcessing(boolean parallelProcessing)
public boolean isParallelAggregate()
public void setParallelAggregate(boolean parallelAggregate)
public boolean isStopOnAggregateException()
public void setStopOnAggregateException(boolean stopOnAggregateException)
public boolean isStopOnException()
public void setStopOnException(boolean stopOnException)
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService executorService)
public boolean isShutdownExecutorService()
public void setShutdownExecutorService(boolean shutdownExecutorService)
public AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public long getTimeout()
public void setTimeout(long timeout)
public Processor getOnPrepare()
public void setOnPrepare(Processor onPrepare)
public boolean isShareUnitOfWork()
public void setShareUnitOfWork(boolean shareUnitOfWork)
public int getCacheSize()
public void setCacheSize(int cacheSize)
Apache Camel