activemq-cpp-3.4.0

activemq::cmsutil::CachedConsumer Class Reference

A cached message consumer contained within a pooled session. More...

#include <src/main/activemq/cmsutil/CachedConsumer.h>

Inheritance diagram for activemq::cmsutil::CachedConsumer:

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::Messagereceive ()
 Synchronously Receive a Message.
virtual cms::Messagereceive (int millisecs)
 Synchronously Receive a Message, time out after defined interval.
virtual cms::MessagereceiveNoWait ()
 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::MessageListenergetMessageListener () 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.

Detailed Description

A cached message consumer contained within a pooled session.


Constructor & Destructor Documentation

activemq::cmsutil::CachedConsumer::CachedConsumer ( cms::MessageConsumer consumer) [inline]
virtual activemq::cmsutil::CachedConsumer::~CachedConsumer ( ) throw () [inline, virtual]

Member Function Documentation

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.

Returns:
The listener of messages received by this consumer
Exceptions:
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.

Returns:
This Consumer's selector expression or "".
Exceptions:
CMSException- If an internal error occurs.

Implements cms::MessageConsumer.

virtual cms::Message* activemq::cmsutil::CachedConsumer::receive ( ) [inline, virtual]

Synchronously Receive a Message.

Returns:
new message which the caller owns and must delete.
Exceptions:
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.

Returns:
new message which the caller owns and must delete.
Exceptions:
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.

Returns:
new message which the caller owns and must delete.
Exceptions:
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.

Parameters:
listenerThe listener of messages received by this consumer.
Exceptions:
CMSException- If an internal error occurs.

Implements cms::MessageConsumer.

virtual void activemq::cmsutil::CachedConsumer::start ( ) [inline, virtual]

Starts the service.

Exceptions:
CMSExceptionif an internal error occurs while starting.

Implements cms::Startable.

virtual void activemq::cmsutil::CachedConsumer::stop ( ) [inline, virtual]

Stops this service.

Exceptions:
CMSException- if an internal error occurs while stopping the Service.

Implements cms::Stoppable.


The documentation for this class was generated from the following file: