Class AmqpMessageSource.AmqpAckCallback
java.lang.Object
org.springframework.integration.amqp.inbound.AmqpMessageSource.AmqpAckCallback
- All Implemented Interfaces:
AcknowledgmentCallback
,SimpleAcknowledgment
- Enclosing class:
- AmqpMessageSource
public static class AmqpMessageSource.AmqpAckCallback extends Object implements AcknowledgmentCallback
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.acks.AcknowledgmentCallback
AcknowledgmentCallback.Status
-
Constructor Summary
Constructors Constructor Description AmqpAckCallback(AmqpMessageSource.AmqpAckInfo ackInfo)
-
Method Summary
Modifier and Type Method Description void
acknowledge(AcknowledgmentCallback.Status status)
Acknowledge the message.protected AmqpMessageSource.AmqpAckInfo
getAckInfo()
boolean
isAcknowledged()
Implementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.boolean
isAutoAck()
Return true if this acknowledgment supports auto ack when it has not been already ack'd by the application.void
noAutoAck()
Disable auto acknowledgment by aSourcePollingChannelAdapter
orMessageSourcePollingTemplate
.protected void
setAcknowledged(boolean acknowledged)
String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.integration.acks.AcknowledgmentCallback
acknowledge
-
Constructor Details
-
Method Details
-
getAckInfo
-
setAcknowledged
protected void setAcknowledged(boolean acknowledged) -
isAcknowledged
public boolean isAcknowledged()Description copied from interface:AcknowledgmentCallback
Implementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.- Specified by:
isAcknowledged
in interfaceAcknowledgmentCallback
- Returns:
- true if the message is already acknowledged.
-
noAutoAck
public void noAutoAck()Description copied from interface:AcknowledgmentCallback
Disable auto acknowledgment by aSourcePollingChannelAdapter
orMessageSourcePollingTemplate
. Not all implementations support this - for example, the Kafka message source.- Specified by:
noAutoAck
in interfaceAcknowledgmentCallback
-
isAutoAck
public boolean isAutoAck()Description copied from interface:AcknowledgmentCallback
Return true if this acknowledgment supports auto ack when it has not been already ack'd by the application.- Specified by:
isAutoAck
in interfaceAcknowledgmentCallback
- Returns:
- true if auto ack is supported.
-
acknowledge
Description copied from interface:AcknowledgmentCallback
Acknowledge the message.- Specified by:
acknowledge
in interfaceAcknowledgmentCallback
- Parameters:
status
- the status.
-
toString
-