|
||||||||||
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<Type> org.apache.camel.model.OutputDefinition<TryDefinition> org.apache.camel.model.TryDefinition
public class TryDefinition
Represents an XML <try/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.OutputDefinition |
---|
outputs |
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
inheritErrorHandler, log |
Constructor Summary | |
---|---|
TryDefinition()
|
Method Summary | |
---|---|
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()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
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. |
void |
setOutputs(List<ProcessorDefinition<?>> outputs)
|
String |
toString()
|
Methods inherited from class org.apache.camel.model.OutputDefinition |
---|
getOutputs, isOutputSupported |
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 TryDefinition()
Method Detail |
---|
public String toString()
toString
in class OutputDefinition<TryDefinition>
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in interface NamedNode
getShortName
in class OutputDefinition<TryDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in class ProcessorDefinition<TryDefinition>
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<TryDefinition>
Exception
public TryDefinition doCatch(Class<? extends Throwable> exceptionType)
exceptionType
- the exception
public 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 false
public 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 definitionprotected void checkInitialized()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |