@Metadata(label="error") public class TryDefinition extends OutputDefinition<TryDefinition>
outputsinheritErrorHandler, 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
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
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() |
TryDefinition |
handled(boolean handled)
Deprecated.
will be removed in Camel 3.0. Instead of using handled(false) you can re-throw the exception
from a
Processor or use the ProcessorDefinition.throwException(Exception) |
TryDefinition |
handled(Expression handled)
Deprecated.
will be removed in Camel 3.0. Instead of using handled(false) you can re-throw the exception
from a
Processor or use the ProcessorDefinition.throwException(Exception) |
TryDefinition |
handled(Predicate handled)
Deprecated.
will be removed in Camel 3.0. Instead of using handled(false) you can re-throw the exception
from a
Processor or use the ProcessorDefinition.throwException(Exception) |
TryDefinition |
onWhen(Predicate predicate)
Sets an additional predicate that should be true before the onCatch is triggered.
|
protected void |
preCreateProcessor()
Strategy to execute any custom logic before the
Processor is created. |
void |
setOutputs(List<ProcessorDefinition<?>> outputs) |
String |
toString() |
getOutputs, isOutputSupportedaddInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, configureChild, 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, hystrix, 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, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, process, 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, serviceCall, serviceCall, serviceCall, 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, 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 TryDefinition()
public String toString()
toString in class OutputDefinition<TryDefinition>public String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ProcessorDefinition<TryDefinition>public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<TryDefinition>Exceptionpublic 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(Predicate predicate)
predicate - predicate that determines true or false@Deprecated public TryDefinition handled(boolean handled)
Processor or use the ProcessorDefinition.throwException(Exception)handled - handled or not@Deprecated public TryDefinition handled(Predicate handled)
Processor or use the ProcessorDefinition.throwException(Exception)handled - predicate that determines true or false@Deprecated public TryDefinition handled(Expression handled)
Processor or use the ProcessorDefinition.throwException(Exception)handled - expression 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)
BlockaddOutput in interface BlockaddOutput in class ProcessorDefinition<TryDefinition>output - the processor definitionprotected void preCreateProcessor()
ProcessorDefinitionProcessor is created.preCreateProcessor in class ProcessorDefinition<TryDefinition>protected void checkInitialized()
Apache Camel