@Metadata(label="configuration") public class OnCompletionDefinition extends OutputDefinition<OnCompletionDefinition> implements ExecutorServiceAwareDefinition<OnCompletionDefinition>
outputsinheritErrorHandler, log| Constructor and Description |
|---|
OnCompletionDefinition() |
| Modifier and Type | Method and Description |
|---|---|
ProcessorDefinition<?> |
end()
Ends the current block
|
OnCompletionDefinition |
executorService(ExecutorService executorService)
To use a custom Thread Pool to be used for parallel processing.
|
OnCompletionDefinition |
executorServiceRef(String executorServiceRef)
Refers to a custom Thread Pool to be used for parallel processing.
|
ExecutorService |
getExecutorService() |
String |
getExecutorServiceRef() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind
of expression node
|
String |
getMode() |
String |
getOnCompleteOnly() |
String |
getOnFailureOnly() |
WhenDefinition |
getOnWhen() |
List<ProcessorDefinition<?>> |
getOutputs() |
String |
getParallelProcessing() |
String |
getShortName() |
String |
getUseOriginalMessage() |
boolean |
isAbstract()
Whether this model is abstract or not.
|
boolean |
isRouteScoped() |
boolean |
isTopLevelOnly()
Whether this definition can only be added as top-level directly on the
route itself (such as onException,onCompletion,intercept, etc.)
If trying to add a top-level only definition to a nested output would
fail in the
ProcessorDefinition.addOutput(ProcessorDefinition) method. |
OnCompletionDefinition |
modeAfterConsumer()
Sets the mode to be after route is done (default due backwards
compatible).
|
OnCompletionDefinition |
modeBeforeConsumer()
Sets the mode to be before consumer is done.
|
OnCompletionDefinition |
onCompleteOnly()
Will only synchronize when the
Exchange
completed successfully (no errors). |
OnCompletionDefinition |
onFailureOnly()
Will only synchronize when the
Exchange ended
with failure (exception or FAULT message). |
OnCompletionDefinition |
onWhen(org.apache.camel.Predicate predicate)
Sets an additional predicate that should be true before the onCompletion
is triggered.
|
OnCompletionDefinition |
parallelProcessing()
If enabled then the on completion process will run asynchronously by a
separate thread from a thread pool.
|
OnCompletionDefinition |
parallelProcessing(boolean parallelProcessing)
If enabled then the on completion process will run asynchronously by a
separate thread from a thread pool.
|
void |
removeAllOnCompletionDefinition(ProcessorDefinition<?> definition)
Removes all existing
OnCompletionDefinition from the
definition. |
void |
setExecutorService(ExecutorService executorService) |
void |
setExecutorServiceRef(String executorServiceRef) |
void |
setMode(String mode)
Sets the on completion mode.
|
void |
setOnCompleteOnly(String onCompleteOnly) |
void |
setOnFailureOnly(String onFailureOnly) |
void |
setOnWhen(WhenDefinition onWhen) |
void |
setOutputs(List<ProcessorDefinition<?>> outputs) |
void |
setParallelProcessing(String parallelProcessing) |
void |
setParent(ProcessorDefinition<?> parent) |
void |
setRouteScoped(boolean routeScoped) |
void |
setUseOriginalMessage(String useOriginalMessage)
Will use the original input message body when an
Exchange for this on completion. |
String |
toString() |
OnCompletionDefinition |
useOriginalBody()
Will use the original input message body when an
Exchange for this on completion. |
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isInheritErrorHandler, isWrappingEntireOutput, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTapdescription, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexecutorServicepublic OnCompletionDefinition()
public void setRouteScoped(boolean routeScoped)
public boolean isRouteScoped()
public void setParent(ProcessorDefinition<?> parent)
setParent in class ProcessorDefinition<OnCompletionDefinition>public String toString()
toString in class OutputDefinition<OnCompletionDefinition>public String getShortName()
getShortName in interface org.apache.camel.NamedNodegetShortName in class OutputDefinition<OnCompletionDefinition>public String getLabel()
ProcessorDefinitiongetLabel in interface org.apache.camel.NamedNodegetLabel in class ProcessorDefinition<OnCompletionDefinition>public boolean isAbstract()
ProcessorDefinitionisAbstract in class ProcessorDefinition<OnCompletionDefinition>public boolean isTopLevelOnly()
ProcessorDefinitionProcessorDefinition.addOutput(ProcessorDefinition) method.isTopLevelOnly in class ProcessorDefinition<OnCompletionDefinition>public void removeAllOnCompletionDefinition(ProcessorDefinition<?> definition)
OnCompletionDefinition from the
definition.
This is used to let route scoped onCompletion overrule any
global onCompletion. Hence we remove all existing as they are
global.definition - the parent definition that is the routepublic ProcessorDefinition<?> end()
ProcessorDefinitionend in class ProcessorDefinition<OnCompletionDefinition>public OnCompletionDefinition modeAfterConsumer()
public OnCompletionDefinition modeBeforeConsumer()
public OnCompletionDefinition onCompleteOnly()
Exchange
completed successfully (no errors).public OnCompletionDefinition onFailureOnly()
Exchange ended
with failure (exception or FAULT message).public OnCompletionDefinition onWhen(@AsPredicate org.apache.camel.Predicate predicate)
predicate - predicate that determines true or falsepublic OnCompletionDefinition useOriginalBody()
Exchange for this on completion.
By default this feature is off.public OnCompletionDefinition executorService(ExecutorService executorService)
executorService in interface ExecutorServiceAwareDefinition<OnCompletionDefinition>executorService - the executor servicepublic OnCompletionDefinition executorServiceRef(String executorServiceRef)
executorServiceRef in interface ExecutorServiceAwareDefinition<OnCompletionDefinition>executorServiceRef - reference for a
ExecutorService to lookup in the
Registrypublic OnCompletionDefinition parallelProcessing()
public OnCompletionDefinition parallelProcessing(boolean parallelProcessing)
public List<ProcessorDefinition<?>> getOutputs()
getOutputs in class OutputDefinition<OnCompletionDefinition>public void setOutputs(List<ProcessorDefinition<?>> outputs)
setOutputs in class OutputDefinition<OnCompletionDefinition>public void setMode(String mode)
public String getOnCompleteOnly()
public void setOnCompleteOnly(String onCompleteOnly)
public String getOnFailureOnly()
public void setOnFailureOnly(String onFailureOnly)
public WhenDefinition getOnWhen()
public void setOnWhen(WhenDefinition onWhen)
public ExecutorService getExecutorService()
getExecutorService in interface org.apache.camel.ExecutorServiceAwarepublic void setExecutorService(ExecutorService executorService)
setExecutorService in interface org.apache.camel.ExecutorServiceAwarepublic String getExecutorServiceRef()
getExecutorServiceRef in interface org.apache.camel.ExecutorServiceAwarepublic void setExecutorServiceRef(String executorServiceRef)
setExecutorServiceRef in interface org.apache.camel.ExecutorServiceAwarepublic String getUseOriginalMessage()
public void setUseOriginalMessage(String useOriginalMessage)
Exchange for this on completion.
By default this feature is off.public String getParallelProcessing()
public void setParallelProcessing(String parallelProcessing)
Apache Camel