@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<?>> |
getOutputsWithoutCatches() |
String |
getShortName() |
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 |
setOutputs(List<ProcessorDefinition<?>> outputs) |
String |
toString() |
getOutputs, isOutputSupported
addInterceptStrategy, aggregate, aggregate, aggregate, aggregate, attribute, bean, bean, bean, bean, bean, bean, bean, choice, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endHystrix, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, hystrix, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, 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, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, 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, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setBody, setExchangePattern, setFaultBody, setHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setParent, 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, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setId
public TryDefinition()
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 exceptionpublic 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 List<CatchDefinition> getCatchClauses()
public FinallyDefinition getFinallyClause()
public List<ProcessorDefinition<?>> getOutputsWithoutCatches()
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 definitionpublic void preCreateProcessor()
ProcessorDefinition
Processor
is created.preCreateProcessor
in class ProcessorDefinition<TryDefinition>
protected void checkInitialized()
Apache Camel