Class IdempotentOnCompletion

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

public class IdempotentOnCompletion extends Object implements org.apache.camel.spi.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.

  • Constructor Summary

    Constructors
    Constructor
    Description
    IdempotentOnCompletion(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onComplete(org.apache.camel.Exchange exchange)
     
    protected void
    onCompletedMessage(org.apache.camel.Exchange exchange, String messageId)
    A strategy method to allow derived classes to overload the behavior of processing a completed message
    protected void
    onFailedMessage(org.apache.camel.Exchange exchange, String messageId)
    A strategy method to allow derived classes to overload the behavior of processing a failed message
    void
    onFailure(org.apache.camel.Exchange exchange)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.spi.Synchronization

    getRouteSynchronization
  • Constructor Details

    • IdempotentOnCompletion

      public IdempotentOnCompletion(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure)
  • Method Details

    • onComplete

      public void onComplete(org.apache.camel.Exchange exchange)
      Specified by:
      onComplete in interface org.apache.camel.spi.Synchronization
    • onFailure

      public void onFailure(org.apache.camel.Exchange exchange)
      Specified by:
      onFailure in interface org.apache.camel.spi.Synchronization
    • onCompletedMessage

      protected void onCompletedMessage(org.apache.camel.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(org.apache.camel.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