org.ow2.jonas.camel.component
Class FailureResistentExceptionHandlerProcessor
java.lang.Object
org.ow2.jonas.camel.component.FailureResistentExceptionHandlerProcessor
- All Implemented Interfaces:
- org.apache.camel.Processor
public class FailureResistentExceptionHandlerProcessor
- extends java.lang.Object
- implements org.apache.camel.Processor
Camel processor for error handling which is resistent to failures.
Let's assume a route like the following:
from("file:///a?delete=true").to("file:///b");
onException(Throwable.class).handled(true).to("file:///data/error");
If for some reason the /data/error folder is not accessible, the
onException clause will stop; but will have set
handled to true. As a result, the file will be
LOST.
In order to avoid such a case, this processor handles such failures and makes
sure the file in folder /a stays there after the failure (as a
result, stays "not processed yet").
|
Method Summary |
void |
process(org.apache.camel.Exchange exchange)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FailureResistentExceptionHandlerProcessor
public FailureResistentExceptionHandlerProcessor(java.lang.String destination)
process
public void process(org.apache.camel.Exchange exchange)
throws java.lang.Exception
- Specified by:
process in interface org.apache.camel.Processor
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011 OW2 Consortium. All Rights Reserved.
Apache Camel version 2.5.0, OW2 JOnAS version 5.2.0-M3