org.apache.camel.spi
Interface Synchronization

All Known Implementing Classes:
GenericFileOnCompletion, IdempotentOnCompletion, SynchronizationAdapter

public interface Synchronization

Provides a hook for custom Processor or Component instances to respond to completed or failed processing of an Exchange rather like Spring's TransactionSynchronization

Version:
$Revision: 14915 $

Method Summary
 void onComplete(Exchange exchange)
          Called when the processing of the message exchange is complete
 void onFailure(Exchange exchange)
          Called when the processing of the message exchange has failed for some reason.
 

Method Detail

onComplete

void onComplete(Exchange exchange)
Called when the processing of the message exchange is complete

Parameters:
exchange - the exchange being processed

onFailure

void onFailure(Exchange exchange)
Called when the processing of the message exchange has failed for some reason. The exception which caused the problem is in Exchange.getException() and there could be a fault message via Message.isFault()

Parameters:
exchange - the exchange being processed


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.