org.apache.camel.processor.idempotent
Class IdempotentOnCompletion

java.lang.Object
  extended by org.apache.camel.processor.idempotent.IdempotentOnCompletion
All Implemented Interfaces:
Synchronization

public class IdempotentOnCompletion
extends Object
implements Synchronization

On completion strategy for IdempotentConsumer.

This strategy adds the message id to the idempotent repository in cast the exchange was processed successfully. In case of failure the message id is not added.

Version:
$Revision: 19027 $

Constructor Summary
IdempotentOnCompletion(IdempotentRepository<String> idempotentRepository, String messageId, boolean eager)
           
 
Method Summary
 void onComplete(Exchange exchange)
          Called when the processing of the message exchange is complete
protected  void onCompletedMessage(Exchange exchange, String messageId)
          A strategy method to allow derived classes to overload the behavior of processing a completed message
protected  void onFailedMessage(Exchange exchange, String messageId)
          A strategy method to allow derived classes to overload the behavior of processing a failed message
 void onFailure(Exchange exchange)
          Called when the processing of the message exchange has failed for some reason.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdempotentOnCompletion

public IdempotentOnCompletion(IdempotentRepository<String> idempotentRepository,
                              String messageId,
                              boolean eager)
Method Detail

onComplete

public void onComplete(Exchange exchange)
Description copied from interface: Synchronization
Called when the processing of the message exchange is complete

Specified by:
onComplete in interface Synchronization
Parameters:
exchange - the exchange being processed

onFailure

public void onFailure(Exchange exchange)
Description copied from interface: Synchronization
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()

Specified by:
onFailure in interface Synchronization
Parameters:
exchange - the exchange being processed

onCompletedMessage

protected void onCompletedMessage(Exchange exchange,
                                  String messageId)
A strategy method to allow derived classes to overload the behavior of processing a completed message

Parameters:
exchange - the exchange
messageId - the message ID of this exchange

onFailedMessage

protected void onFailedMessage(Exchange exchange,
                               String messageId)
A strategy method to allow derived classes to overload the behavior of processing a failed message

Parameters:
exchange - the exchange
messageId - the message ID of this exchange

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL