activemq-cpp-3.4.0
|
A cached message consumer contained within a pooled session. More...
#include <src/main/activemq/cmsutil/CachedConsumer.h>
Public Member Functions | |
CachedConsumer (cms::MessageConsumer *consumer) | |
virtual | ~CachedConsumer () throw () |
virtual void | close () |
Does nothing - the real producer resource will be closed by the lifecycle manager. | |
virtual void | start () |
Starts the service. | |
virtual void | stop () |
Stops this service. | |
virtual cms::Message * | receive () |
Synchronously Receive a Message. | |
virtual cms::Message * | receive (int millisecs) |
Synchronously Receive a Message, time out after defined interval. | |
virtual cms::Message * | receiveNoWait () |
Receive a Message, does not wait if there isn't a new message to read, returns NULL if nothing read. | |
virtual void | setMessageListener (cms::MessageListener *listener) |
Sets the MessageListener that this class will send notifs on. | |
virtual cms::MessageListener * | getMessageListener () const |
Gets the MessageListener that this class will send mew Message notification events to. | |
virtual std::string | getMessageSelector () const |
Gets this message consumer's message selector expression. |
A cached message consumer contained within a pooled session.
activemq::cmsutil::CachedConsumer::CachedConsumer | ( | cms::MessageConsumer * | consumer | ) | [inline] |
virtual activemq::cmsutil::CachedConsumer::~CachedConsumer | ( | ) | throw () [inline, virtual] |
virtual void activemq::cmsutil::CachedConsumer::close | ( | ) | [inline, virtual] |
Does nothing - the real producer resource will be closed by the lifecycle manager.
Implements cms::Closeable.
virtual cms::MessageListener* activemq::cmsutil::CachedConsumer::getMessageListener | ( | ) | const [inline, virtual] |
Gets the MessageListener that this class will send mew Message notification events to.
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual std::string activemq::cmsutil::CachedConsumer::getMessageSelector | ( | ) | const [inline, virtual] |
Gets this message consumer's message selector expression.
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual cms::Message* activemq::cmsutil::CachedConsumer::receive | ( | ) | [inline, virtual] |
Synchronously Receive a Message.
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual cms::Message* activemq::cmsutil::CachedConsumer::receive | ( | int | millisecs | ) | [inline, virtual] |
Synchronously Receive a Message, time out after defined interval.
Returns null if nothing read.
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual cms::Message* activemq::cmsutil::CachedConsumer::receiveNoWait | ( | ) | [inline, virtual] |
Receive a Message, does not wait if there isn't a new message to read, returns NULL if nothing read.
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual void activemq::cmsutil::CachedConsumer::setMessageListener | ( | cms::MessageListener * | listener | ) | [inline, virtual] |
Sets the MessageListener that this class will send notifs on.
listener | The listener of messages received by this consumer. |
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
virtual void activemq::cmsutil::CachedConsumer::start | ( | ) | [inline, virtual] |
Starts the service.
CMSException | if an internal error occurs while starting. |
Implements cms::Startable.
virtual void activemq::cmsutil::CachedConsumer::stop | ( | ) | [inline, virtual] |
Stops this service.
CMSException | - if an internal error occurs while stopping the Service. |
Implements cms::Stoppable.