org.apache.camel.processor
Class ThrowExceptionProcessor

java.lang.Object
  extended by org.apache.camel.processor.ThrowExceptionProcessor
All Implemented Interfaces:
Processor, Traceable

public class ThrowExceptionProcessor
extends Object
implements Processor, Traceable

The processor which implements the ThrowException DSL


Constructor Summary
ThrowExceptionProcessor(Exception exception)
           
 
Method Summary
 String getTraceLabel()
          Gets the trace label used for logging when tracing is enabled.
 void process(Exchange exchange)
          Set the exception in the exchange
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThrowExceptionProcessor

public ThrowExceptionProcessor(Exception exception)
Method Detail

process

public void process(Exchange exchange)
             throws Exception
Set the exception in the exchange

Specified by:
process in interface Processor
Parameters:
exchange - the message exchange
Throws:
Exception - if an internal processing error has occurred.

getTraceLabel

public String getTraceLabel()
Description copied from interface: Traceable
Gets the trace label used for logging when tracing is enabled.

The label should be short and precise.

Specified by:
getTraceLabel in interface Traceable
Returns:
the label

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL