|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.processor.ErrorHandlerSupport
org.apache.camel.processor.DeadLetterChannel
public class DeadLetterChannel
Implements a Dead Letter
Channel after attempting to redeliver the message using the
RedeliveryPolicy
Field Summary | |
---|---|
static String |
EXCEPTION_CAUSE_PROPERTY
|
static String |
REDELIVERED
|
static String |
REDELIVERY_COUNTER
|
Constructor Summary | |
---|---|
DeadLetterChannel(Processor output,
Processor deadLetter)
|
|
DeadLetterChannel(Processor output,
Processor deadLetter,
RedeliveryPolicy redeliveryPolicy,
Logger logger,
ExceptionPolicyStrategy exceptionPolicyStrategy)
|
Method Summary | ||
---|---|---|
static
|
createDefaultLogger()
|
|
protected void |
doStart()
|
|
protected void |
doStop()
|
|
Processor |
getDeadLetter()
Returns the dead letter that message exchanges will be sent to if the redelivery attempts fail |
|
Logger |
getLogger()
|
|
Processor |
getOutput()
Returns the output processor |
|
RedeliveryPolicy |
getRedeliveryPolicy()
|
|
protected int |
incrementRedeliveryCounter(Exchange exchange,
Throwable e)
Increments the redelivery counter and adds the redelivered flag if the message has been redelivered |
|
static boolean |
isFailureHandled(Exchange exchange)
|
|
void |
process(Exchange exchange)
Processes the message exchange |
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange. |
|
boolean |
process(Exchange exchange,
AsyncCallback callback,
org.apache.camel.processor.DeadLetterChannel.RedeliveryData data)
|
|
static void |
restoreExceptionOnExchange(Exchange exchange)
|
|
static void |
setFailureHandled(Exchange exchange,
boolean isHandled)
|
|
void |
setLogger(Logger logger)
Sets the logger strategy; which Log to use and which
LoggingLevel to use |
|
void |
setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
Sets the redelivery policy |
|
String |
toString()
|
Methods inherited from class org.apache.camel.processor.ErrorHandlerSupport |
---|
addExceptionPolicy, createDefaultExceptionPolicyStrategy, customProcessorForException, getExceptionPolicy, setExceptionPolicy |
Methods inherited from class org.apache.camel.impl.ServiceSupport |
---|
addChildService, getThreadName, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REDELIVERY_COUNTER
public static final String REDELIVERED
public static final String EXCEPTION_CAUSE_PROPERTY
Constructor Detail |
---|
public DeadLetterChannel(Processor output, Processor deadLetter)
public DeadLetterChannel(Processor output, Processor deadLetter, RedeliveryPolicy redeliveryPolicy, Logger logger, ExceptionPolicyStrategy exceptionPolicyStrategy)
Method Detail |
---|
public static <E extends Exchange> Logger createDefaultLogger()
public String toString()
toString
in class Object
public boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but
the caller supports having the exchange asynchronously processed.
process
in interface AsyncProcessor
exchange
- the Exchange
to processcallback
- the AsyncCallback
will be invoked when the processing
of the exchange is completed. If the exchange is completed synchronously, then the
callback is also invoked synchronously. The callback should therefore be careful of
starting recursive loop.
public boolean process(Exchange exchange, AsyncCallback callback, org.apache.camel.processor.DeadLetterChannel.RedeliveryData data)
public static boolean isFailureHandled(Exchange exchange)
public static void setFailureHandled(Exchange exchange, boolean isHandled)
public static void restoreExceptionOnExchange(Exchange exchange)
public void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
Exception
- if an internal processing error has occurred.public Processor getOutput()
public Processor getDeadLetter()
public RedeliveryPolicy getRedeliveryPolicy()
public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
public Logger getLogger()
public void setLogger(Logger logger)
Log
to use and which
LoggingLevel
to use
protected int incrementRedeliveryCounter(Exchange exchange, Throwable e)
protected void doStart() throws Exception
doStart
in class ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class ServiceSupport
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |