@Metadata(label="error") public class ThrowExceptionDefinition extends NoOutputDefinition<ThrowExceptionDefinition>
inheritErrorHandler, log| Constructor and Description |
|---|
ThrowExceptionDefinition() |
| Modifier and Type | Method and Description |
|---|---|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
protected String |
description() |
Exception |
getException() |
Class<? extends Exception> |
getExceptionClass() |
String |
getExceptionType() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
String |
getMessage() |
String |
getRef() |
void |
setException(Exception exception) |
void |
setExceptionClass(Class<? extends Exception> exceptionClass)
The class of the exception to create using the message.
|
void |
setExceptionType(String exceptionType)
The class of the exception to create using the message.
|
void |
setMessage(String message)
To create a new exception instance and use the given message as caused message (supports simple language)
|
void |
setRef(String ref)
Reference to the exception instance to lookup from the registry to throw
|
String |
toString() |
getOutputs, isOutputSupportedaddInterceptStrategies, addInterceptStrategy, addOutput, 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, 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, pollEnrichRef, pollEnrichRef, preCreateProcessor, 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, 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, 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 ThrowExceptionDefinition()
protected String description()
public String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ProcessorDefinition<ThrowExceptionDefinition>public Processor createProcessor(RouteContext routeContext)
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<ThrowExceptionDefinition>public void setRef(String ref)
public Exception getException()
public void setException(Exception exception)
public String getMessage()
public void setMessage(String message)
public String getExceptionType()
public void setExceptionType(String exceptionType)
setMessage(String)public Class<? extends Exception> getExceptionClass()
public void setExceptionClass(Class<? extends Exception> exceptionClass)
setMessage(String)Apache Camel