Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
#include <qpid/messaging/Receiver.h>
Inherits qpid::messaging::Handle< ReceiverImpl >.
Public Member Functions | |
QPID_MESSAGING_EXTERN | Receiver (ReceiverImpl *impl=0) |
QPID_MESSAGING_EXTERN | Receiver (const Receiver &) |
QPID_MESSAGING_EXTERN | ~Receiver () |
QPID_MESSAGING_EXTERN Receiver & | operator= (const Receiver &) |
QPID_MESSAGING_EXTERN bool | get (Message &message, Duration timeout=Duration::FOREVER) |
Retrieves a message from this receivers local queue, or waits for upto the specified timeout for a message to become available. | |
QPID_MESSAGING_EXTERN Message | get (Duration timeout=Duration::FOREVER) |
Retrieves a message from this receivers local queue, or waits for up to the specified timeout for a message to become available. | |
QPID_MESSAGING_EXTERN bool | fetch (Message &message, Duration timeout=Duration::FOREVER) |
Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available. | |
QPID_MESSAGING_EXTERN Message | fetch (Duration timeout=Duration::FOREVER) |
Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available. | |
QPID_MESSAGING_EXTERN void | setCapacity (uint32_t) |
Sets the capacity for the receiver. | |
QPID_MESSAGING_EXTERN uint32_t | getCapacity () |
QPID_MESSAGING_EXTERN uint32_t | getAvailable () |
QPID_MESSAGING_EXTERN uint32_t | getUnsettled () |
QPID_MESSAGING_EXTERN void | close () |
Cancels this receiver. | |
QPID_MESSAGING_EXTERN bool | isClosed () const |
Return true if the receiver was closed by a call to close(). | |
QPID_MESSAGING_EXTERN const std::string & | getName () const |
Returns the name of this receiver. | |
QPID_MESSAGING_EXTERN Session | getSession () const |
Returns a handle to the session associated with this receiver. | |
QPID_MESSAGING_EXTERN bool | isValid () const |
QPID_MESSAGING_EXTERN bool | isNull () const |
QPID_MESSAGING_EXTERN | operator bool () const |
Conversion to bool supports idiom if (handle) { handle->. | |
QPID_MESSAGING_EXTERN bool | operator! () const |
Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }. | |
void | swap (Handle< ReceiverImpl > &h) |
Protected Types | |
typedef ReceiverImpl | Impl |
Protected Attributes | |
Impl * | impl |
Definition at line 42 of file Receiver.h.
typedef ReceiverImpl qpid::messaging::Handle< ReceiverImpl >::Impl [protected, inherited] |
QPID_MESSAGING_EXTERN qpid::messaging::Receiver::Receiver | ( | ReceiverImpl * | impl = 0 |
) |
QPID_MESSAGING_EXTERN qpid::messaging::Receiver::Receiver | ( | const Receiver & | ) |
QPID_MESSAGING_EXTERN qpid::messaging::Receiver::~Receiver | ( | ) |
QPID_MESSAGING_EXTERN void qpid::messaging::Receiver::close | ( | ) |
Cancels this receiver.
QPID_MESSAGING_EXTERN Message qpid::messaging::Receiver::fetch | ( | Duration | timeout = Duration::FOREVER |
) |
Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.
Unlike get() this method will check with the server that there is no message for the subscription this receiver is serving before throwing an exception.
NoMessageAvailable | if there is no message to give after waiting for the specified timeout, or if the Receiver is closed, in which case isClose() will be true. |
QPID_MESSAGING_EXTERN bool qpid::messaging::Receiver::fetch | ( | Message & | message, | |
Duration | timeout = Duration::FOREVER | |||
) |
Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.
Unlike get() this method will check with the server that there is no message for the subscription this receiver is serving before returning false.
QPID_MESSAGING_EXTERN Message qpid::messaging::Receiver::get | ( | Duration | timeout = Duration::FOREVER |
) |
Retrieves a message from this receivers local queue, or waits for up to the specified timeout for a message to become available.
NoMessageAvailable | if there is no message to give after waiting for the specified timeout, or if the Receiver is closed, in which case isClose() will be true. |
QPID_MESSAGING_EXTERN bool qpid::messaging::Receiver::get | ( | Message & | message, | |
Duration | timeout = Duration::FOREVER | |||
) |
Retrieves a message from this receivers local queue, or waits for upto the specified timeout for a message to become available.
QPID_MESSAGING_EXTERN uint32_t qpid::messaging::Receiver::getAvailable | ( | ) |
QPID_MESSAGING_EXTERN uint32_t qpid::messaging::Receiver::getCapacity | ( | ) |
QPID_MESSAGING_EXTERN const std::string& qpid::messaging::Receiver::getName | ( | ) | const |
Returns the name of this receiver.
QPID_MESSAGING_EXTERN Session qpid::messaging::Receiver::getSession | ( | ) | const |
Returns a handle to the session associated with this receiver.
QPID_MESSAGING_EXTERN uint32_t qpid::messaging::Receiver::getUnsettled | ( | ) |
QPID_MESSAGING_EXTERN bool qpid::messaging::Receiver::isClosed | ( | ) | const |
Return true if the receiver was closed by a call to close().
QPID_MESSAGING_EXTERN bool qpid::messaging::Handle< ReceiverImpl >::isNull | ( | ) | const [inline, inherited] |
QPID_MESSAGING_EXTERN bool qpid::messaging::Handle< ReceiverImpl >::isValid | ( | ) | const [inline, inherited] |
QPID_MESSAGING_EXTERN qpid::messaging::Handle< ReceiverImpl >::operator bool | ( | ) | const [inline, inherited] |
QPID_MESSAGING_EXTERN bool qpid::messaging::Handle< ReceiverImpl >::operator! | ( | ) | const [inline, inherited] |
QPID_MESSAGING_EXTERN void qpid::messaging::Receiver::setCapacity | ( | uint32_t | ) |
Sets the capacity for the receiver.
The capacity determines how many incoming messages can be held in the receiver before being requested by a client via fetch() (or pushed to a listener).
void qpid::messaging::Handle< ReceiverImpl >::swap | ( | Handle< ReceiverImpl > & | h | ) | [inline, inherited] |
Impl* qpid::messaging::Handle< ReceiverImpl >::impl [protected, inherited] |