|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.OptionalIdentifiedDefinition<Type> org.apache.camel.model.ProcessorDefinition<CatchDefinition> org.apache.camel.model.CatchDefinition
public class CatchDefinition
Represents an XML <catch/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
inheritErrorHandler, log |
Constructor Summary | |
---|---|
CatchDefinition()
|
|
CatchDefinition(Class<? extends Throwable> exceptionType)
|
|
CatchDefinition(List<Class<? extends Throwable>> exceptionClasses)
|
Method Summary | |
---|---|
protected List<Class<? extends Throwable>> |
createExceptionClasses(CamelContext context)
|
CatchProcessor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor based on the definition model. |
CatchDefinition |
exceptionClasses(Class<? extends Throwable> exception)
Sets the exception class that the CatchType want to catch |
CatchDefinition |
exceptionClasses(List<Class<? extends Throwable>> exceptionClasses)
Sets the exceptionClasses of the CatchType |
List<Class<? extends Throwable>> |
getExceptionClasses()
|
List<String> |
getExceptions()
|
ExpressionSubElementDefinition |
getHandled()
|
Predicate |
getHandledPolicy()
|
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node |
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 |
CatchDefinition |
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) |
CatchDefinition |
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) |
CatchDefinition |
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) |
boolean |
isOutputSupported()
|
CatchDefinition |
onWhen(Predicate predicate)
Sets an additional predicate that should be true before the onCatch is triggered. |
void |
setExceptionClasses(List<Class<? extends Throwable>> exceptionClasses)
|
void |
setExceptions(List<String> exceptions)
|
void |
setHandled(ExpressionSubElementDefinition handled)
|
void |
setHandledPolicy(Predicate handledPolicy)
|
void |
setOnWhen(WhenDefinition onWhen)
|
void |
setOutputs(List<ProcessorDefinition<?>> outputs)
|
String |
toString()
|
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition |
---|
description, getDescription, getDescriptionText, 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 CatchDefinition()
public CatchDefinition(List<Class<? extends Throwable>> exceptionClasses)
public CatchDefinition(Class<? extends Throwable> exceptionType)
Method Detail |
---|
public String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in interface NamedNode
getShortName
in class OptionalIdentifiedDefinition<CatchDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in class ProcessorDefinition<CatchDefinition>
public CatchProcessor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<CatchDefinition>
Exception
public List<ProcessorDefinition<?>> getOutputs()
getOutputs
in class ProcessorDefinition<CatchDefinition>
public void setOutputs(List<ProcessorDefinition<?>> outputs)
public boolean isOutputSupported()
isOutputSupported
in class ProcessorDefinition<CatchDefinition>
public List<Class<? extends Throwable>> getExceptionClasses()
public void setExceptionClasses(List<Class<? extends Throwable>> exceptionClasses)
public CatchDefinition exceptionClasses(List<Class<? extends Throwable>> exceptionClasses)
exceptionClasses
- a list of the exception classes
public CatchDefinition onWhen(Predicate predicate)
predicate
- predicate that determines true or false
@Deprecated public CatchDefinition handled(boolean handled)
Processor
or use the ProcessorDefinition.throwException(Exception)
handled
- handled or not
@Deprecated public CatchDefinition handled(Predicate handled)
Processor
or use the ProcessorDefinition.throwException(Exception)
handled
- predicate that determines true or false
@Deprecated public CatchDefinition handled(Expression handled)
Processor
or use the ProcessorDefinition.throwException(Exception)
handled
- expression that determines true or false
public CatchDefinition exceptionClasses(Class<? extends Throwable> exception)
exception
- the exception of class
public List<String> getExceptions()
public void setExceptions(List<String> exceptions)
public WhenDefinition getOnWhen()
public void setOnWhen(WhenDefinition onWhen)
public Predicate getHandledPolicy()
public void setHandledPolicy(Predicate handledPolicy)
public ExpressionSubElementDefinition getHandled()
public void setHandled(ExpressionSubElementDefinition handled)
protected List<Class<? extends Throwable>> createExceptionClasses(CamelContext context) throws ClassNotFoundException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |