summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-09 20:55:09 +0000
committerAlan Conway <aconway@apache.org>2008-06-09 20:55:09 +0000
commit03a39d920d010b29b156a99ee9b3fcfc7c7c64a1 (patch)
tree0959d63de389bd08fcb5d074eb5a0712a1db24a8 /cpp/src/qpid/client/LocalQueue.h
parent31a74cd4a5c849b134a172cc5e6ce2e2a447e5e5 (diff)
downloadqpid-python-03a39d920d010b29b156a99ee9b3fcfc7c7c64a1.tar.gz
Updated doxygen comments in qpid/client/*.h
Changed request-response example to use SubscriptionManager like the others. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@665891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.h')
-rw-r--r--cpp/src/qpid/client/LocalQueue.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.h b/cpp/src/qpid/client/LocalQueue.h
index 58887077f6..c76d0756eb 100644
--- a/cpp/src/qpid/client/LocalQueue.h
+++ b/cpp/src/qpid/client/LocalQueue.h
@@ -30,23 +30,45 @@ namespace qpid {
namespace client {
/**
- * Local representation of a remote queue.
+ * A local queue to collect messages retrieved from a remote broker
+ * queue. Create a queue and subscribe it using the SubscriptionManager.
+ * Messages from the remote queue on the broker will be stored in the
+ * local queue until you retrieve them.
*
* \ingroup clientapi
*/
class LocalQueue
{
public:
- LocalQueue(AckPolicy=AckPolicy());
+ /** Create a local queue. Subscribe the local queue to a remote broker
+ * queue with a SubscriptionManager.
+ *
+ * LocalQueue is an alternative to implementing a MessageListener.
+ *
+ *@param ackPolicy Policy for acknowledging messages. @see AckPolicy.
+ */
+ LocalQueue(AckPolicy ackPolicy=AckPolicy());
+
~LocalQueue();
- /** Pop the next message off the queue.
+ /** Pop the next message off the local queue.
*@exception ClosedException if subscription has been closed.
*/
Message pop();
+
+ /** Synonym for get(). */
+ Message get() { return pop(); }
+
+ /** Return true if local queue is empty. */
bool empty() const;
+
+ /** Number of messages on the local queue */
size_t size() const;
+
+ /** Set the message acknowledgement policy. @see AckPolicy. */
void setAckPolicy(AckPolicy);
+
+ /** Get the message acknowledgement policy. @see AckPolicy. */
AckPolicy& getAckPolicy();
private: