org.apache.camel.model
Class ExceptionType

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedType<Type>
      extended by org.apache.camel.model.ProcessorType<ProcessorType>
          extended by org.apache.camel.model.ExceptionType
All Implemented Interfaces:
Block

public class ExceptionType
extends ProcessorType<ProcessorType>

Represents an XML <onException/> element

Version:
$Revision: 62995 $

Field Summary
 
Fields inherited from class org.apache.camel.model.ProcessorType
DEFAULT_TRACE_CATEGORY
 
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType
nodeCounters
 
Constructor Summary
ExceptionType()
           
ExceptionType(Class exceptionType)
           
ExceptionType(List<Class> exceptionClasses)
           
 
Method Summary
 void addRoutes(RouteContext routeContext, Collection<Route> routes)
           
 ExceptionType backOffMultiplier(double backOffMultiplier)
           
 ExceptionType collisionAvoidanceFactor(double collisionAvoidanceFactor)
           
 ExceptionType collisionAvoidancePercent(short collisionAvoidancePercent)
           
protected  List<Class> createExceptionClasses()
           
 CatchProcessor createProcessor(RouteContext routeContext)
           
 RedeliveryPolicy createRedeliveryPolicy(CamelContext context, RedeliveryPolicy parentPolicy)
          Allows an exception handler to create a new redelivery policy for this exception type
 Processor getErrorHandler()
           
 List<Class> getExceptionClasses()
           
 List<String> getExceptions()
           
 ExpressionSubElementType getHandled()
           
 Predicate getHandledPolicy()
           
 WhenType getOnWhen()
           
protected  RedeliveryPolicyType getOrCreateRedeliveryPolicy()
           
 List<ProcessorType<?>> getOutputs()
           
 RedeliveryPolicyType getRedeliveryPolicy()
           
 ExceptionType handled(boolean handled)
           
 ExceptionType handled(Expression handled)
           
 ExceptionType handled(Predicate handled)
           
 ExceptionType initialRedeliveryDelay(long initialRedeliveryDelay)
           
 ExceptionType maximumRedeliveries(int maximumRedeliveries)
           
 ExceptionType maximumRedeliveryDelay(long maximumRedeliveryDelay)
           
 ExceptionType onException(Class exceptionType)
          Catches an exception type.
 ExpressionClause<ExceptionType> onWhen()
           
 ExceptionType onWhen(Predicate predicate)
           
 ExceptionType retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel)
           
 ExceptionType retryAttemptedLogLevel(LoggingLevel retryAttemptedLogLevel)
           
 void setExceptionClasses(List<Class> exceptionClasses)
           
 void setExceptions(List<String> exceptions)
           
 void setHandled(ExpressionSubElementType handled)
           
 void setHandledPolicy(Predicate handledPolicy)
           
 void setOnWhen(WhenType onWhen)
           
 void setOutputs(List<ProcessorType<?>> outputs)
           
 void setRedeliveryPolicy(RedeliveryPolicyType redeliveryPolicy)
           
 String toString()
           
 ExceptionType useCollisionAvoidance()
           
 ExceptionType useExponentialBackOff()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionType

public ExceptionType()

ExceptionType

public ExceptionType(List<Class> exceptionClasses)

ExceptionType

public ExceptionType(Class exceptionType)
Method Detail

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 context
parentPolicy - 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.