A cached message consumer contained within a pooled session.
More...
#include <src/main/activemq/cmsutil/CachedConsumer.h>
A cached message consumer contained within a pooled session.
◆ CachedConsumer()
◆ ~CachedConsumer()
virtual activemq::cmsutil::CachedConsumer::~CachedConsumer |
( |
| ) |
|
|
virtual |
◆ close()
virtual void activemq::cmsutil::CachedConsumer::close |
( |
| ) |
|
|
inlinevirtual |
Does nothing - the real producer resource will be closed by the lifecycle manager.
Implements cms::Closeable.
◆ getMessageAvailableListener()
Gets the MessageAvailableListener that this class will send mew Message notification events to.
- Returns
- The listener of message events received by this consumer.
- Exceptions
-
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
◆ getMessageListener()
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.
◆ getMessageSelector()
virtual std::string activemq::cmsutil::CachedConsumer::getMessageSelector |
( |
| ) |
const |
|
inlinevirtual |
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.
◆ getMessageTransformer()
◆ receive() [1/2]
virtual cms::Message * activemq::cmsutil::CachedConsumer::receive |
( |
| ) |
|
|
inlinevirtual |
Synchronously Receive a Message.
- Returns
- new message which the caller owns and must delete.
- Exceptions
-
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
◆ receive() [2/2]
virtual cms::Message * activemq::cmsutil::CachedConsumer::receive |
( |
int | millisecs | ) |
|
|
inlinevirtual |
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.
◆ receiveNoWait()
virtual cms::Message * activemq::cmsutil::CachedConsumer::receiveNoWait |
( |
| ) |
|
|
inlinevirtual |
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.
◆ setMessageAvailableListener()
Sets the MessageAvailableListener that this class will send events to if the consumer is in synchronous consumption mode and a new Message has arrived.
- Parameters
-
listener | The listener of new message events fired by this consumer. |
- Exceptions
-
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
◆ setMessageListener()
virtual void activemq::cmsutil::CachedConsumer::setMessageListener |
( |
cms::MessageListener * | listener | ) |
|
|
inlinevirtual |
Sets the MessageListener that this class will send notifs on.
- Parameters
-
listener | The listener of messages received by this consumer. |
- Exceptions
-
CMSException | - If an internal error occurs. |
Implements cms::MessageConsumer.
◆ setMessageTransformer()
Set an MessageTransformer instance that is applied to all cms::Message objects before they are dispatched to client code.
The CMS code never takes ownership of the MessageTransformer pointer which implies that the client code must ensure that the object remains valid for the lifetime of the CMS object to which the MessageTransformer has been assigned.
- Parameters
-
Implements cms::MessageConsumer.
◆ start()
virtual void activemq::cmsutil::CachedConsumer::start |
( |
| ) |
|
|
inlinevirtual |
Starts the service.
- Exceptions
-
CMSException | if an internal error occurs while starting. |
Implements cms::Startable.
◆ stop()
virtual void activemq::cmsutil::CachedConsumer::stop |
( |
| ) |
|
|
inlinevirtual |
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: