org.apache.camel.model
Class ExceptionType
java.lang.Object
org.apache.camel.model.OptionalIdentifiedType<Type>
org.apache.camel.model.ProcessorType<ProcessorType>
org.apache.camel.model.ExceptionType
- All Implemented Interfaces:
- Block
public class ExceptionType
- extends ProcessorType<ProcessorType>
Represents an XML <onException/> element
- Version:
- $Revision: 1767 $
Methods inherited from class org.apache.camel.model.ProcessorType |
addInterceptor, addInterceptor, addOutput, aggregator, aggregator, aggregator, aggregator, aggregator, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, configureChild, convertBodyTo, convertBodyTo, convertFaultBodyTo, convertOutBodyTo, createCompositeProcessor, createErrorHandlerBuilder, createOutputsProcessor, createOutputsProcessor, delayer, delayer, delayer, delayer, end, errorHandler, exception, filter, filter, filter, filter, getErrorHandlerBuilder, getErrorHandlerRef, getInheritErrorHandlerFlag, getLabel, getNodeFactory, getParent, handleFault, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, intercept, intercept, intercept, intercept, interceptor, interceptors, isInheritErrorHandler, isInheritErrorHandler, loadBalance, loop, loop, loop, makeProcessor, marshal, marshal, marshal, marshal, multicast, multicast, multicast, pipeline, pipeline, pipeline, policies, policy, popBlock, proceed, process, processRef, pushBlock, recipientList, recipientList, removeFaultHeader, removeHeader, removeProperty, resequencer, resequencer, resequencer, resequencer, routingSlip, routingSlip, routingSlip, setBody, setBody, setErrorHandlerBuilder, setErrorHandlerBuilderIfNull, setErrorHandlerRef, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setHeader, setInheritErrorHandlerFlag, setNodeFactory, setOutBody, setOutBody, setOutHeader, setOutHeader, setParent, setProperty, setProperty, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, stop, thread, thread, throttler, throwFault, throwFault, to, to, to, to, to, to, to, to, to, to, trace, trace, transform, transform, tryBlock, unmarshal, unmarshal, unmarshal, unmarshal, wrapInErrorHandler, wrapProcessor, wrapProcessorInInterceptors |
Methods inherited from class org.apache.camel.model.OptionalIdentifiedType |
createId, describe, description, description, getDescription, getId, getNodeCounter, getShortName, id, idOrCreate, setDescription, setId |
ExceptionType
public ExceptionType()
ExceptionType
public ExceptionType(List<Class> exceptionClasses)
ExceptionType
public ExceptionType(Class exceptionType)
toString
public String toString()
- Overrides:
toString
in class Object
onException
public ExceptionType onException(Class exceptionType)
- Catches an exception type.
- Overrides:
onException
in class ProcessorType<ProcessorType>
createRedeliveryPolicy
public RedeliveryPolicy createRedeliveryPolicy(CamelContext context,
RedeliveryPolicy parentPolicy)
- Allows an exception handler to create a new redelivery policy for this exception type
- Parameters:
context
- the camel contextparentPolicy
- the current redelivery policy
- Returns:
- a newly created redelivery policy, or return the original policy if no customization is required
for this exception handler.
addRoutes
public void addRoutes(RouteContext routeContext,
Collection<Route> routes)
throws Exception
- Overrides:
addRoutes
in class ProcessorType<ProcessorType>
- Throws:
Exception
createProcessor
public CatchProcessor createProcessor(RouteContext routeContext)
throws Exception
- Overrides:
createProcessor
in class ProcessorType<ProcessorType>
- Throws:
Exception
handled
public ExceptionType handled(boolean handled)
handled
public ExceptionType handled(Predicate handled)
handled
public ExceptionType handled(Expression handled)
onWhen
public ExceptionType onWhen(Predicate predicate)
onWhen
public ExpressionClause<ExceptionType> onWhen()
backOffMultiplier
public ExceptionType backOffMultiplier(double backOffMultiplier)
collisionAvoidanceFactor
public ExceptionType collisionAvoidanceFactor(double collisionAvoidanceFactor)
collisionAvoidancePercent
public ExceptionType collisionAvoidancePercent(short collisionAvoidancePercent)
initialRedeliveryDelay
public ExceptionType initialRedeliveryDelay(long initialRedeliveryDelay)
retriesExhaustedLogLevel
public ExceptionType retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel)
retryAttemptedLogLevel
public ExceptionType retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel)
maximumRedeliveries
public ExceptionType maximumRedeliveries(int maximumRedeliveries)
useCollisionAvoidance
public ExceptionType useCollisionAvoidance()
useExponentialBackOff
public ExceptionType useExponentialBackOff()
maximumRedeliveryDelay
public ExceptionType maximumRedeliveryDelay(long maximumRedeliveryDelay)
getOutputs
public List<ProcessorType<?>> getOutputs()
- Specified by:
getOutputs
in class ProcessorType<ProcessorType>
setOutputs
public void setOutputs(List<ProcessorType<?>> outputs)
getExceptionClasses
public List<Class> getExceptionClasses()
setExceptionClasses
public void setExceptionClasses(List<Class> exceptionClasses)
getExceptions
public List<String> getExceptions()
setExceptions
public void setExceptions(List<String> exceptions)
getErrorHandler
public Processor getErrorHandler()
getRedeliveryPolicy
public RedeliveryPolicyType getRedeliveryPolicy()
setRedeliveryPolicy
public void setRedeliveryPolicy(RedeliveryPolicyType redeliveryPolicy)
getHandledPolicy
public Predicate getHandledPolicy()
setHandled
public void setHandled(ExpressionSubElementType handled)
getHandled
public ExpressionSubElementType getHandled()
setHandledPolicy
public void setHandledPolicy(Predicate handledPolicy)
getOnWhen
public WhenType getOnWhen()
setOnWhen
public void setOnWhen(WhenType onWhen)
getOrCreateRedeliveryPolicy
protected RedeliveryPolicyType getOrCreateRedeliveryPolicy()
createExceptionClasses
protected List<Class> createExceptionClasses()
Copyright © 2009 IONA Open Source Community. All Rights Reserved.