Spring AMQP

org.springframework.amqp.rabbit.support
Interface PublisherCallbackChannel.Listener

All Known Implementing Classes:
RabbitTemplate
Enclosing interface:
PublisherCallbackChannel

public static interface PublisherCallbackChannel.Listener

Listeners implementing this interface can participate in publisher confirms received from multiple channels, by invoking addListener on each channel. Standard AMQP channels do not support a listener being registered on multiple channels.


Method Summary
 String getUUID()
          Returns the UUID used to identify this Listener for returns.
 void handleConfirm(PendingConfirm pendingConfirm, boolean ack)
          Invoked by the channel when a confirm is received.
 void handleReturn(int replyCode, String replyText, String exchange, String routingKey, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body)
           
 boolean isConfirmListener()
           
 boolean isReturnListener()
           
 void removePendingConfirmsReference(com.rabbitmq.client.Channel channel, SortedMap<Long,PendingConfirm> unconfirmed)
          When called, this listener must remove all references to the pending confirm map.
 

Method Detail

handleConfirm

void handleConfirm(PendingConfirm pendingConfirm,
                   boolean ack)
Invoked by the channel when a confirm is received.

Parameters:
pendingConfirm - The pending confirmation, containing correlation data.
ack - true when 'ack', false when 'nack'.

handleReturn

void handleReturn(int replyCode,
                  String replyText,
                  String exchange,
                  String routingKey,
                  com.rabbitmq.client.AMQP.BasicProperties properties,
                  byte[] body)
                  throws IOException
Throws:
IOException

removePendingConfirmsReference

void removePendingConfirmsReference(com.rabbitmq.client.Channel channel,
                                    SortedMap<Long,PendingConfirm> unconfirmed)
When called, this listener must remove all references to the pending confirm map.

Parameters:
unconfirmed - The pending confirm map.

getUUID

String getUUID()
Returns the UUID used to identify this Listener for returns.

Returns:
A string representation of the UUID.

isConfirmListener

boolean isConfirmListener()

isReturnListener

boolean isReturnListener()

Spring AMQP