qpid::client::SubscriptionManager Class Reference
[Application API for an AMQP client]

Utility to assist with creating subscriptions. More...

#include <SubscriptionManager.h>

Inheritance diagram for qpid::client::SubscriptionManager:

Inheritance graph
[legend]
Collaboration diagram for qpid::client::SubscriptionManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SubscriptionManager (Session &session)
Completion subscribe (MessageListener &listener, const std::string &queue, const std::string &tag=std::string())
 Subscribe a MessagesListener to receive messages from queue.
Completion subscribe (LocalQueue &localQueue, const std::string &queue, const std::string &tag=std::string())
 Subscribe a LocalQueue to receive messages from queue.
void cancel (const std::string tag)
 Cancel a subscription.
void run ()
 Deliver messages until stop() is called.
void setAutoStop (bool set=true)
 If set true, run() will stop when all subscriptions are cancelled.
void stop ()
 Cause run() to return.
void setFlowControl (const std::string &tag, uint32_t messages, uint32_t bytes, bool window=true)
 Set the flow control for destination tag.
void setFlowControl (uint32_t messages, uint32_t bytes, bool window=true)
 Set the initial flow control settings to be applied to each new subscribtion.
void setConfirmMode (bool confirm)
 Set the confirm-mode for new subscriptions.
void setAcquireMode (bool acquire)
 Set the acquire-mode for new subscriptions.
void setAckPolicy (const AckPolicy &autoAck)
 Set the acknowledgement policy for new subscriptions.

Static Public Attributes

static const uint32_t UNLIMITED = 0xFFFFFFFF

Detailed Description

Utility to assist with creating subscriptions.


Member Function Documentation

void qpid::client::SubscriptionManager::setAckPolicy ( const AckPolicy autoAck  ) 

Set the acknowledgement policy for new subscriptions.

Default is to acknowledge every message automatically.

void qpid::client::SubscriptionManager::setAcquireMode ( bool  acquire  ) 

Set the acquire-mode for new subscriptions.

Defaults to false.

Parameters:
acquire,: if false messages pre-acquired, if true messages are dequed on acknowledgement or on transfer depending on confirmMode.

void qpid::client::SubscriptionManager::setAutoStop ( bool  set = true  ) 

If set true, run() will stop when all subscriptions are cancelled.

If false, run will only stop when stop() is called. True by default.

void qpid::client::SubscriptionManager::setConfirmMode ( bool  confirm  ) 

Set the confirm-mode for new subscriptions.

Defaults to true.

Parameters:
confirm,: if true messages must be confirmed by calling Message::acknowledge() or automatically, see setAckPolicy()

void qpid::client::SubscriptionManager::setFlowControl ( uint32_t  messages,
uint32_t  bytes,
bool  window = true 
)

Set the initial flow control settings to be applied to each new subscribtion.

Parameters:
messages,: message credit.
bytes,: byte credit.
window,: if true use window-based flow control.

void qpid::client::SubscriptionManager::setFlowControl ( const std::string &  tag,
uint32_t  messages,
uint32_t  bytes,
bool  window = true 
)

Set the flow control for destination tag.

Parameters:
tag,: name of the destination.
messages,: message credit.
bytes,: byte credit.
window,: if true use window-based flow control.

Completion qpid::client::SubscriptionManager::subscribe ( LocalQueue localQueue,
const std::string &  queue,
const std::string &  tag = std::string() 
)

Subscribe a LocalQueue to receive messages from queue.

Parameters:
queue Name of the queue to subscribe to.
tag Unique destination tag for the listener. If not specified, the queue name is used.

Completion qpid::client::SubscriptionManager::subscribe ( MessageListener listener,
const std::string &  queue,
const std::string &  tag = std::string() 
)

Subscribe a MessagesListener to receive messages from queue.

Parameters:
listener Listener object to receive messages.
queue Name of the queue to subscribe to.
tag Unique destination tag for the listener. If not specified, the queue name is used.


The documentation for this class was generated from the following file:
Generated on Thu Apr 10 11:09:03 2008 for Qpid by  doxygen 1.4.7