@Metadata(label="eip,routing") public class DelayDefinition extends ExpressionNode implements ExecutorServiceAwareDefinition<DelayDefinition>
inheritErrorHandler, log| Constructor and Description |
|---|
DelayDefinition() |
DelayDefinition(Expression delay) |
| Modifier and Type | Method and Description |
|---|---|
DelayDefinition |
asyncDelayed()
Enables asynchronous delay which means the thread will noy block while delaying.
|
DelayDefinition |
callerRunsWhenRejected(boolean callerRunsWhenRejected)
Whether or not the caller should run the task when it was rejected by the thread pool.
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
DelayDefinition |
delayTime(Long delay)
Sets the delay time in millis to delay
|
DelayDefinition |
executorService(ExecutorService executorService)
To use a custom Thread Pool if asyncDelay has been enabled.
|
DelayDefinition |
executorServiceRef(String executorServiceRef)
Refers to a custom Thread Pool if asyncDelay has been enabled.
|
Boolean |
getAsyncDelayed() |
Boolean |
getCallerRunsWhenRejected() |
ExecutorService |
getExecutorService()
Gets the executor service
|
String |
getExecutorServiceRef()
Gets the reference to lookup in the
Registry for the executor service to be used. |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
void |
setAsyncDelayed(Boolean asyncDelayed) |
void |
setCallerRunsWhenRejected(Boolean callerRunsWhenRejected) |
void |
setExecutorService(ExecutorService executorService)
Sets the executor service to be used.
|
void |
setExecutorServiceRef(String executorServiceRef)
Sets a reference to lookup in the
Registry for the executor service to be used. |
void |
setExpression(ExpressionDefinition expression)
Expression to define how long time to wait (in millis)
|
String |
toString() |
configureChild, createFilterProcessor, createPredicate, getExpression, getOutputs, isOutputSupported, preCreateProcessor, setOutputsaddInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createOutputsProcessorImpl, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrichRef, enrichRef, enrichRef, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, process, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, script, script, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapInErrorHandler, wrapProcessordescription, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setIdpublic DelayDefinition()
public DelayDefinition(Expression delay)
public String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ExpressionNodepublic Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<ExpressionNode>Exceptionpublic DelayDefinition delayTime(Long delay)
delay - delay time in millispublic DelayDefinition callerRunsWhenRejected(boolean callerRunsWhenRejected)
callerRunsWhenRejected - whether or not the caller should runpublic DelayDefinition asyncDelayed()
public DelayDefinition executorService(ExecutorService executorService)
executorService in interface ExecutorServiceAwareDefinition<DelayDefinition>executorService - the executor servicepublic DelayDefinition executorServiceRef(String executorServiceRef)
executorServiceRef in interface ExecutorServiceAwareDefinition<DelayDefinition>executorServiceRef - reference for a ExecutorService
to lookup in the Registrypublic void setExpression(ExpressionDefinition expression)
setExpression in class ExpressionNodepublic Boolean getAsyncDelayed()
public void setAsyncDelayed(Boolean asyncDelayed)
public Boolean getCallerRunsWhenRejected()
public void setCallerRunsWhenRejected(Boolean callerRunsWhenRejected)
public ExecutorService getExecutorService()
ExecutorServiceAwaregetExecutorService in interface ExecutorServiceAwarepublic void setExecutorService(ExecutorService executorService)
ExecutorServiceAwaresetExecutorService in interface ExecutorServiceAwareexecutorService - the executorpublic String getExecutorServiceRef()
ExecutorServiceAwareRegistry for the executor service to be used.getExecutorServiceRef in interface ExecutorServiceAwarepublic void setExecutorServiceRef(String executorServiceRef)
ExecutorServiceAwareRegistry for the executor service to be used.setExecutorServiceRef in interface ExecutorServiceAwareexecutorServiceRef - reference for the executorApache Camel