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 forIdempotentConsumer
. 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
All Methods Instance Methods Concrete Methods 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 messageprotected void
onFailedMessage(org.apache.camel.Exchange exchange, String messageId)
A strategy method to allow derived classes to overload the behavior of processing a failed messagevoid
onFailure(org.apache.camel.Exchange exchange)
String
toString()
-
-
-
Constructor Detail
-
IdempotentOnCompletion
public IdempotentOnCompletion(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure)
-
-
Method Detail
-
onComplete
public void onComplete(org.apache.camel.Exchange exchange)
- Specified by:
onComplete
in interfaceorg.apache.camel.spi.Synchronization
-
onFailure
public void onFailure(org.apache.camel.Exchange exchange)
- Specified by:
onFailure
in interfaceorg.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 exchangemessageId
- 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 exchangemessageId
- the message ID of this exchange
-
-