Spring AMQP

org.springframework.amqp.rabbit.support
Interface PublisherCallbackChannel

All Superinterfaces:
com.rabbitmq.client.Channel, com.rabbitmq.client.ShutdownNotifier
All Known Implementing Classes:
PublisherCallbackChannelImpl

public interface PublisherCallbackChannel
extends com.rabbitmq.client.Channel

Instances of this interface support a single listener being registered for publisher confirms with multiple channels, by adding context to the callbacks.

Since:
1.0.1
Author:
Gary Russell

Nested Class Summary
static interface PublisherCallbackChannel.Listener
          Listeners implementing this interface can participate in publisher confirms received from multiple channels, by invoking addListener on each channel.
 
Field Summary
static String RETURN_CORRELATION
           
 
Method Summary
 SortedMap<Long,PendingConfirm> addListener(PublisherCallbackChannel.Listener listener)
          Adds a PublisherCallbackChannel.Listener and returns a reference to the pending confirms map for that listener's pending confirms, allowing the Listener to assess unconfirmed sends at any point in time.
 void addPendingConfirm(PublisherCallbackChannel.Listener listener, long seq, PendingConfirm pendingConfirm)
          Adds a pending confirmation to this channel's map.
 boolean removeListener(PublisherCallbackChannel.Listener listener)
          Gets a reference to the current listener, or null.
 
Methods inherited from interface com.rabbitmq.client.Channel
abort, abort, addConfirmListener, addFlowListener, addReturnListener, asyncRpc, basicAck, basicCancel, basicConsume, basicConsume, basicConsume, basicConsume, basicGet, basicNack, basicPublish, basicPublish, basicPublish, basicQos, basicQos, basicRecover, basicRecover, basicRecoverAsync, basicReject, clearConfirmListeners, clearFlowListeners, clearReturnListeners, close, close, confirmSelect, exchangeBind, exchangeBind, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclare, exchangeDeclarePassive, exchangeDelete, exchangeDelete, exchangeUnbind, exchangeUnbind, flow, getChannelNumber, getConnection, getDefaultConsumer, getFlow, getNextPublishSeqNo, queueBind, queueBind, queueDeclare, queueDeclare, queueDeclarePassive, queueDelete, queueDelete, queuePurge, queueUnbind, queueUnbind, removeConfirmListener, removeFlowListener, removeReturnListener, rpc, setDefaultConsumer, txCommit, txRollback, txSelect, waitForConfirms, waitForConfirms, waitForConfirmsOrDie, waitForConfirmsOrDie
 
Methods inherited from interface com.rabbitmq.client.ShutdownNotifier
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener
 

Field Detail

RETURN_CORRELATION

static final String RETURN_CORRELATION
See Also:
Constant Field Values
Method Detail

addListener

SortedMap<Long,PendingConfirm> addListener(PublisherCallbackChannel.Listener listener)
Adds a PublisherCallbackChannel.Listener and returns a reference to the pending confirms map for that listener's pending confirms, allowing the Listener to assess unconfirmed sends at any point in time. The client must NOT modify the contents of this array, and must synchronize on it when iterating over its collections.

Parameters:
listener - The Listener.
Returns:
A reference to pending confirms for the listener

removeListener

boolean removeListener(PublisherCallbackChannel.Listener listener)
Gets a reference to the current listener, or null.

Returns:
the Listener.

addPendingConfirm

void addPendingConfirm(PublisherCallbackChannel.Listener listener,
                       long seq,
                       PendingConfirm pendingConfirm)
Adds a pending confirmation to this channel's map.

Parameters:
seq - The key to the map.
pendingConfirm - The PendingConfirm object.

Spring AMQP