@Metadata(label="error") public class TryDefinition extends OutputDefinition<TryDefinition>
outputs
inheritErrorHandler, log
Constructor and Description |
---|
TryDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
addOutput(ProcessorDefinition<?> output)
Adds the given definition as output to this block
|
protected void |
checkInitialized()
Checks whether or not this object has been initialized
|
TryDefinition |
doCatch(Class<? extends Throwable>... exceptionType)
Handles the given exception(s)
|
TryDefinition |
doCatch(Class<? extends Throwable> exceptionType)
Handles the given exception
|
TryDefinition |
doFinally()
The finally block for a given handle
|
List<CatchDefinition> |
getCatchClauses() |
FinallyDefinition |
getFinallyClause() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
List<ProcessorDefinition<?>> |
getOutputs() |
List<ProcessorDefinition<?>> |
getOutputsWithoutCatches() |
String |
getShortName() |
protected ProcessorDefinition<?> |
onEndDoTry() |
TryDefinition |
onWhen(org.apache.camel.Predicate predicate)
Sets an additional predicate that should be true before the onCatch is triggered.
|
void |
preCreateProcessor()
Strategy to execute any custom logic before the
Processor is created. |
void |
setCatchClauses(List<CatchDefinition> catchClauses) |
void |
setFinallyClause(FinallyDefinition finallyClause) |
void |
setOutputs(List<ProcessorDefinition<?>> outputs) |
String |
toString() |
addInterceptStrategy, 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, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoCatch, 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, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, 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, 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, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, 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, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
public String toString()
toString
in class OutputDefinition<TryDefinition>
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
getShortName
in class OutputDefinition<TryDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ProcessorDefinition<TryDefinition>
public TryDefinition doCatch(Class<? extends Throwable> exceptionType)
exceptionType
- the exception@SafeVarargs public final TryDefinition doCatch(Class<? extends Throwable>... exceptionType)
exceptionType
- the exception(s)public TryDefinition doFinally()
public TryDefinition onWhen(@AsPredicate org.apache.camel.Predicate predicate)
predicate
- predicate that determines true or falsepublic void setCatchClauses(List<CatchDefinition> catchClauses)
public List<CatchDefinition> getCatchClauses()
public void setFinallyClause(FinallyDefinition finallyClause)
public FinallyDefinition getFinallyClause()
public List<ProcessorDefinition<?>> getOutputsWithoutCatches()
public List<ProcessorDefinition<?>> getOutputs()
getOutputs
in class OutputDefinition<TryDefinition>
public void setOutputs(List<ProcessorDefinition<?>> outputs)
setOutputs
in class OutputDefinition<TryDefinition>
public void addOutput(ProcessorDefinition<?> output)
Block
addOutput
in interface Block
addOutput
in class ProcessorDefinition<TryDefinition>
output
- the processor definitionprotected ProcessorDefinition<?> onEndDoTry()
public void preCreateProcessor()
ProcessorDefinition
Processor
is created.preCreateProcessor
in class ProcessorDefinition<TryDefinition>
protected void checkInitialized()
Apache Camel