diff options
Diffstat (limited to 'cpp/src/qpid/client')
-rw-r--r-- | cpp/src/qpid/client/AckMode.h | 4 | ||||
-rw-r--r-- | cpp/src/qpid/client/Channel.h | 70 | ||||
-rw-r--r-- | cpp/src/qpid/client/Connection.h | 22 | ||||
-rw-r--r-- | cpp/src/qpid/client/Exchange.h | 8 | ||||
-rw-r--r-- | cpp/src/qpid/client/Message.h | 2 | ||||
-rw-r--r-- | cpp/src/qpid/client/MessageQueue.h | 2 | ||||
-rw-r--r-- | cpp/src/qpid/client/Queue.h | 26 | ||||
-rw-r--r-- | cpp/src/qpid/client/SessionBase.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/client/SessionBase.h | 19 |
9 files changed, 77 insertions, 78 deletions
diff --git a/cpp/src/qpid/client/AckMode.h b/cpp/src/qpid/client/AckMode.h index 944fba655d..b411c322d8 100644 --- a/cpp/src/qpid/client/AckMode.h +++ b/cpp/src/qpid/client/AckMode.h @@ -29,7 +29,7 @@ namespace client { /** * DEPRECATED * - * The available acknowledgements modes for Channel (now also deprecated). + * The available acknowledgement modes for Channel (now also deprecated). */ enum AckMode { /** No acknowledgement will be sent, broker can @@ -38,7 +38,7 @@ enum AckMode { NO_ACK = 0, /** Each message will be automatically acknowledged as soon as it is delivered to the - application **/ + application. **/ AUTO_ACK = 1, /** Acknowledgements will be sent automatically, but not for each message. **/ diff --git a/cpp/src/qpid/client/Channel.h b/cpp/src/qpid/client/Channel.h index 1c3c2c9ae8..9a22c455c4 100644 --- a/cpp/src/qpid/client/Channel.h +++ b/cpp/src/qpid/client/Channel.h @@ -102,11 +102,11 @@ class Channel : private sys::Runnable * * @param transactional if true, the publishing and acknowledgement * of messages will be transactional and can be committed or - * aborted in atomic units (@see commit(), @see rollback()) + * aborted in atomic units (@see commit(), @see rollback()). * * @param prefetch specifies the number of unacknowledged * messages the channel is willing to have sent to it - * asynchronously + * asynchronously. */ Channel(bool transactional = false, u_int16_t prefetch = 0); @@ -115,43 +115,43 @@ class Channel : private sys::Runnable /** * Declares an exchange. * - * In AMQP Exchanges are the destinations to which messages + * In AMQP, Exchanges are the destinations to which messages * are published. They have Queues bound to them and route * messages they receive to those queues. The routing rules * depend on the type of the exchange. * * @param exchange an Exchange object representing the - * exchange to declare + * exchange to declare. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void declareExchange(Exchange& exchange, bool synch = true); /** - * Deletes an exchange + * Deletes an exchange. * - * @param exchange an Exchange object representing the exchange to delete + * @param exchange an Exchange object representing the exchange to delete. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void deleteExchange(Exchange& exchange, bool synch = true); /** - * Declares a Queue + * Declares a Queue. * - * @param queue a Queue object representing the queue to declare + * @param queue a Queue object representing the queue to declare. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void declareQueue(Queue& queue, bool synch = true); /** - * Deletes a Queue + * Deletes a Queue. * - * @param queue a Queue object representing the queue to delete + * @param queue a Queue object representing the queue to delete. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void deleteQueue(Queue& queue, bool ifunused = false, bool ifempty = false, bool synch = true); /** @@ -160,17 +160,17 @@ class Channel : private sys::Runnable * are used) depends on the type of the exchange. * * @param exchange an Exchange object representing the - * exchange to bind to + * exchange to bind to. * * @param queue a Queue object representing the queue to be - * bound + * bound. * - * @param key the 'routing key' for the binding + * @param key the 'routing key' for the binding. * - * @param args the 'binding arguments' for the binding + * @param args the 'binding arguments' for the binding. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void bind(const Exchange& exchange, const Queue& queue, const std::string& key, @@ -180,13 +180,13 @@ class Channel : private sys::Runnable /** * For a transactional channel this will commit all * publications and acknowledgements since the last commit (or - * the channel was opened if there has been no previous + * the channel that was opened if there has been no previous * commit). This will cause published messages to become * available to consumers and acknowledged messages to be * consumed and removed from the queues they were dispatched * from. * - * Transactionailty of a channel is specified when the channel + * A channel is specified as transactional or not when the channel * object is created (@see Channel()). */ void commit(); @@ -194,7 +194,7 @@ class Channel : private sys::Runnable /** * For a transactional channel, this will rollback any * publications or acknowledgements. It will be as if the - * ppblished messages were never sent and the acknowledged + * published messages were never sent and the acknowledged * messages were never consumed. */ void rollback(); @@ -207,7 +207,7 @@ class Channel : private sys::Runnable uint32_t getPrefetch() { return prefetch; } /** - * Start message dispatching on a new thread + * Start message dispatching on a new thread. */ void start(); @@ -217,13 +217,13 @@ class Channel : private sys::Runnable */ void close(); - /** True if the channel is transactional */ + /** True if the channel is transactional. */ bool isTransactional() { return transactional; } - /** True if the channel is open */ + /** True if the channel is open. */ bool isOpen() const; - /** Return the protocol version */ + /** Return the protocol version. */ framing::ProtocolVersion getVersion() const { return version ; } /** @@ -232,11 +232,11 @@ class Channel : private sys::Runnable * asynchronously. * * @param queue a Queue instance representing the queue to - * consume from + * consume from. * * @param tag an identifier to associate with the consumer * that can be used to cancel its subscription (if empty, this - * will be assigned by the broker) + * will be assigned by the broker). * * @param listener a pointer to an instance of an * implementation of the MessageListener interface. Messages @@ -248,10 +248,10 @@ class Channel : private sys::Runnable * should assume for this consumer. @see AckMode * * @param noLocal if true, this consumer will not be sent any - * message published by this connection + * message published by this connection. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void consume( Queue& queue, const std::string& tag, MessageListener* listener, @@ -265,7 +265,7 @@ class Channel : private sys::Runnable * request that set up the subscription to be cancelled. * * @param synch if true this call will block until a response - * is received from the broker + * is received from the broker. */ void cancel(const std::string& tag, bool synch = true); /** @@ -274,7 +274,7 @@ class Channel : private sys::Runnable * @param msg a message object that will contain the message * headers and content if the call completes. * - * @param queue the queue to consume from + * @param queue the queue to consume from. * * @param ackMode the acknowledgement mode to use (@see * AckMode) @@ -287,11 +287,11 @@ class Channel : private sys::Runnable /** * Publishes (i.e. sends a message to the broker). * - * @param msg the message to publish + * @param msg the message to publish. * - * @param exchange the exchange to publish the message to + * @param exchange the exchange to publish the message to. * - * @param routingKey the routing key to publish with + * @param routingKey the routing key to publish with. * * @param mandatory if true and the exchange to which this * publish is directed has no matching bindings, the message diff --git a/cpp/src/qpid/client/Connection.h b/cpp/src/qpid/client/Connection.h index d24809b31e..0ddd383381 100644 --- a/cpp/src/qpid/client/Connection.h +++ b/cpp/src/qpid/client/Connection.h @@ -40,7 +40,7 @@ namespace qpid { namespace client { /** - * \defgroup clientapi Application API for an AMQP client + * \defgroup clientapi Application API for an AMQP client. */ /** @@ -66,14 +66,14 @@ class Connection * Creates a connection object, but does not open the * connection. * - * @param _version the version of the protocol to connect with + * @param _version the version of the protocol to connect with. * * @param debug turns on tracing for the connection * (i.e. prints details of the frames sent and received to std - * out). Optional and defaults to false. + * out). Optional. Defaults to false. * * @param max_frame_size the maximum frame size that the - * client will accept. Optional and defaults to 65535. + * client will accept. Optional. Defaults to 65535. */ Connection(bool debug = false, uint32_t max_frame_size = 65535, framing::ProtocolVersion=framing::highestProtocolVersion); @@ -83,15 +83,15 @@ class Connection /** * Opens a connection to a broker. * - * @param host the host on which the broker is running + * @param host the host on which the broker is running. * - * @param port the port on the which the broker is listening + * @param port the port on the which the broker is listening. * - * @param uid the userid to connect with + * @param uid the userid to connect with. * * @param pwd the password to connect with (currently SASL * PLAIN is the only authentication method supported so this - * is sent in clear text) + * is sent in clear text). * * @param virtualhost the AMQP virtual host to use (virtual * hosts, where implemented(!), provide namespace partitioning @@ -103,7 +103,7 @@ class Connection const std::string& virtualhost = "/"); /** - * Close the connection + * Close the connection. * * Any further use of this connection (without reopening it) will * not succeed. @@ -113,7 +113,7 @@ class Connection /** * Associate a Channel with this connection and open it for use. * - * In AMQP channels are like multi-plexed 'sessions' of work over + * In AMQP, channels are like multiplexed 'sessions' of work over * a connection. Almost all the interaction with AMQP is done over * a channel. * @@ -129,7 +129,7 @@ class Connection * *@param detachedLifetime: A session may be detached from its * channel, either by calling Session::suspend() or because of a - * network failure. The session state is perserved for + * network failure. The session state is preserved for * detachedLifetime seconds to allow a call to resume(). After * that the broker may discard the session state. Default is 0, * meaning the session cannot be resumed. diff --git a/cpp/src/qpid/client/Exchange.h b/cpp/src/qpid/client/Exchange.h index 0640e4fe2c..239c131658 100644 --- a/cpp/src/qpid/client/Exchange.h +++ b/cpp/src/qpid/client/Exchange.h @@ -60,12 +60,12 @@ namespace client { */ static const std::string DIRECT_EXCHANGE; /** - * A topic exchange treat the key with which a queue is bound + * A topic exchange treats the key with which a queue is bound * as a pattern and routes all messages whose routing keys * match that pattern to the bound queue. The routing key for * a message must consist of zero or more alpha-numeric words - * delimited by dots. The pattern is of a similar form but * - * can be used to match excatly one word and # can be used to + * delimited by dots. The pattern is of a similar form, but * + * can be used to match exactly one word and # can be used to * match zero or more words. */ static const std::string TOPIC_EXCHANGE; @@ -77,7 +77,7 @@ namespace client { static const std::string HEADERS_EXCHANGE; /** - * The 'default' exchange, nameless and of type 'direct'. Has + * The 'default' exchange, nameless and of type 'direct', has * every declared queue bound to it by name. */ static const Exchange DEFAULT_EXCHANGE; diff --git a/cpp/src/qpid/client/Message.h b/cpp/src/qpid/client/Message.h index 864a16d9ce..3c22d202ee 100644 --- a/cpp/src/qpid/client/Message.h +++ b/cpp/src/qpid/client/Message.h @@ -30,7 +30,7 @@ namespace qpid { namespace client { /** - * A representation of messages for sent or received through the + * A representation of messages sent or received through the * client api. * * \ingroup clientapi diff --git a/cpp/src/qpid/client/MessageQueue.h b/cpp/src/qpid/client/MessageQueue.h index e9b7a9fe58..ab6d351ba7 100644 --- a/cpp/src/qpid/client/MessageQueue.h +++ b/cpp/src/qpid/client/MessageQueue.h @@ -29,7 +29,7 @@ namespace qpid { namespace client { /** - * A MessageListener implementation that simply queues up + * A MessageListener implementation that queues up * messages. * * \ingroup clientapi diff --git a/cpp/src/qpid/client/Queue.h b/cpp/src/qpid/client/Queue.h index 078e04c29e..baaa890464 100644 --- a/cpp/src/qpid/client/Queue.h +++ b/cpp/src/qpid/client/Queue.h @@ -36,19 +36,19 @@ namespace client { * that the queue exists or is created. * * Queues hold messages and allow clients to consume - * (see Channel::consume()) or get (see Channel::get()) those messags. A - * queue receives messages by being bound to one or more Exchange; - * messages published to that exchange may then be routed to the + * (see Channel::consume()) or get (see Channel::get()) those messages. A + * queue receives messages by being bound to one or more Exchange. + * Messages published to that exchange may then be routed to the * queue based on the details of the binding and the type of the * exchange (see Channel::bind()). * * Queues are identified by a name. They can be exclusive (in which * case they can only be used in the context of the connection - * over which they were declared, and are deleted when then + * over which they were declared, and are deleted when that * connection closes), or they can be shared. Shared queues can be - * auto deleted when they have no consumers. + * automatically deleted when they have no consumers. * - * We use the term 'temporary queue' to refer to an exclusive + * The term 'temporary queue' refers to an exclusive * queue. */ class Queue{ @@ -66,10 +66,10 @@ namespace client { */ Queue(); /** - * Creates a shared, non-durable, queue with a given name, - * that will not be autodeleted. + * Creates a shared, non-durable queue with a given name, + * that will not be automatically deleted. * - * @param name the name of the queue + * @param name the name of the queue. */ Queue(std::string name); /** @@ -78,13 +78,13 @@ namespace client { * @param name the name of the queue * * @param temp if true the queue will be a temporary queue, if - * false it will be shared and not autodeleted. + * false it will be shared and not automatically deleted. */ Queue(std::string name, bool temp); /** - * This constructor allows the autodelete, exclusive and - * durable propeties to be explictly set. Note however that if - * exclusive is true, autodelete has no meaning as exclusive + * This constructor allows the AutoDelete, Exclusive and + * Durable properties to be explictly set. Note however that if + * Exclusive is true, AutoDelete has no meaning as Exclusive * queues are always destroyed when the connection that * created them is closed. */ diff --git a/cpp/src/qpid/client/SessionBase.cpp b/cpp/src/qpid/client/SessionBase.cpp index 5b9ff595ed..dfd0f62e7e 100644 --- a/cpp/src/qpid/client/SessionBase.cpp +++ b/cpp/src/qpid/client/SessionBase.cpp @@ -48,6 +48,8 @@ void SessionBase::flush() impl->sendFlush(); } +// FIXME aconway 2008-04-24: do we need to provide a non-synchronous version +// of sync() or bool paramter to allow setting a sync point for a later wait? void SessionBase::sync() { ExecutionSyncBody b; diff --git a/cpp/src/qpid/client/SessionBase.h b/cpp/src/qpid/client/SessionBase.h index 61997244d2..aa61d2b49b 100644 --- a/cpp/src/qpid/client/SessionBase.h +++ b/cpp/src/qpid/client/SessionBase.h @@ -54,20 +54,17 @@ using framing::Uuid; * functions return immediately. * * ASYNC mode gives better performance for high-volume traffic, but - * requires some additional caution: + * requires some additional caution. * * Session functions return immediately. If the command causes an * exception on the broker, the exception will be thrown on a * <em>later</em> function call. * * If you need to notify some extenal agent that some actions have - * been taken (e.g. binding queues to exchanges), you must ensure that - * the broker has completed the command. In synchronous mode this is - * when the session method for the command returns. In asynchronous - * mode you can call Session::sync(), to ensure that all the commands - * are complete. + * been taken (e.g. binding queues to exchanges), you must call + * Session::sync() first to ensure that all the commands are complete. * - * You can freely switch between modes by calling Session::setSynchronous() + * You can freely switch between modes by calling Session::setSynchronous(). * * @see Session::sync(), Session::setSynchronous() */ @@ -106,12 +103,12 @@ class SessionBase /** * In synchronous mode, wait for the broker's response before - * returning. Note this gives lower throughput than asynchronous + * returning. This gives lower throughput than asynchronous * mode. * * In asynchronous mode commands are sent without waiting - * for a respose (you can use the returned Completion object - * to wait for completion.) + * for a response (you can use the returned Completion object + * to wait for completion). * * @see SynchronousMode */ @@ -121,7 +118,7 @@ class SessionBase SynchronousMode getSynchronous() const; /** - * Suspend the session, can be resumed on a different connection. + * Suspend the session, which can be resumed on a different connection. * @see Connection::resume() */ void suspend(); |