|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.OptionalIdentifiedDefinition
org.apache.camel.model.ProcessorDefinition<OnCompletionDefinition>
org.apache.camel.model.OnCompletionDefinition
public class OnCompletionDefinition
Represents an XML <onCompletion/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
errorHandlerBuilder, errorHandlerRef, inheritErrorHandler, log |
Constructor Summary | |
---|---|
OnCompletionDefinition()
|
Method Summary | |
---|---|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor based on the definition model. |
ProcessorDefinition |
end()
Ends the current block |
OnCompletionDefinition |
executorService(ExecutorService executorService)
Setting the executor service for executing |
OnCompletionDefinition |
executorServiceRef(String executorServiceRef)
Setting the executor service for executing |
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 |
Boolean |
getOnCompleteOnly()
|
Boolean |
getOnFailureOnly()
|
WhenDefinition |
getOnWhen()
|
List<ProcessorDefinition> |
getOutputs()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
Boolean |
getUseOriginalMessagePolicy()
|
boolean |
isAbstract()
Whether this model is abstract or not. |
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). |
ExpressionClause<OnCompletionDefinition> |
onWhen()
Creates an expression to configure an additional predicate that should be true before the onCompletion is triggered. |
OnCompletionDefinition |
onWhen(Predicate predicate)
Sets an additional predicate that should be true before the onCompletion is triggered. |
void |
removeAllOnCompletionDefinition(ProcessorDefinition definition)
Removes all existing OnCompletionDefinition from the definition. |
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 |
setOnCompleteOnly(Boolean onCompleteOnly)
|
void |
setOnFailureOnly(Boolean onFailureOnly)
|
void |
setOnWhen(WhenDefinition onWhen)
|
void |
setOutputs(List<ProcessorDefinition> outputs)
|
void |
setUseOriginalMessagePolicy(Boolean useOriginalMessagePolicy)
|
String |
toString()
|
OnCompletionDefinition |
useOriginalBody()
Will use the original input body when an Exchange for this on completion. |
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition |
---|
description, getDescription, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OnCompletionDefinition()
Method Detail |
---|
public String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in class OptionalIdentifiedDefinition
public String getLabel()
ProcessorDefinition
getLabel
in class ProcessorDefinition<OnCompletionDefinition>
public boolean isAbstract()
ProcessorDefinition
isAbstract
in class ProcessorDefinition<OnCompletionDefinition>
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<OnCompletionDefinition>
Exception
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()
ProcessorDefinition
end
in class ProcessorDefinition<OnCompletionDefinition>
public OnCompletionDefinition onCompleteOnly()
Exchange
completed successfully (no errors).
public OnCompletionDefinition onFailureOnly()
Exchange
ended with failure (exception or FAULT message).
public OnCompletionDefinition onWhen(Predicate predicate)
predicate
- predicate that determines true or false
public ExpressionClause<OnCompletionDefinition> onWhen()
public OnCompletionDefinition useOriginalBody()
Exchange
for this on completion.
By default this feature is off.
public OnCompletionDefinition executorService(ExecutorService executorService)
ExecutorServiceAwareDefinition
executorService
in interface ExecutorServiceAwareDefinition<OnCompletionDefinition>
executorService
- the executor service
public OnCompletionDefinition executorServiceRef(String executorServiceRef)
ExecutorServiceAwareDefinition
executorServiceRef
in interface ExecutorServiceAwareDefinition<OnCompletionDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the Registry
public List<ProcessorDefinition> getOutputs()
getOutputs
in class ProcessorDefinition<OnCompletionDefinition>
public void setOutputs(List<ProcessorDefinition> outputs)
public Boolean getOnCompleteOnly()
public void setOnCompleteOnly(Boolean onCompleteOnly)
public Boolean getOnFailureOnly()
public void setOnFailureOnly(Boolean onFailureOnly)
public WhenDefinition getOnWhen()
public void setOnWhen(WhenDefinition onWhen)
public ExecutorService getExecutorService()
ExecutorServiceAware
getExecutorService
in interface ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
ExecutorServiceAware
setExecutorService
in interface ExecutorServiceAware
executorService
- the executorpublic String getExecutorServiceRef()
ExecutorServiceAware
Registry
for the executor service to be used.
getExecutorServiceRef
in interface ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
ExecutorServiceAware
Registry
for the executor service to be used.
setExecutorServiceRef
in interface ExecutorServiceAware
executorServiceRef
- reference for the executorpublic Boolean getUseOriginalMessagePolicy()
public void setUseOriginalMessagePolicy(Boolean useOriginalMessagePolicy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |