activemq-cpp-3.6.0
activemq::core::MessageDispatchChannel Class Reference

#include <src/main/activemq/core/MessageDispatchChannel.h>

Inheritance diagram for activemq::core::MessageDispatchChannel:

Public Member Functions

virtual ~MessageDispatchChannel ()
virtual void enqueue (const Pointer< MessageDispatch > &message)=0
 Add a Message to the Channel behind all pending message.
virtual void enqueueFirst (const Pointer< MessageDispatch > &message)=0
 Add a message to the front of the Channel.
virtual bool isEmpty () const =0
virtual bool isClosed () const =0
virtual bool isRunning () const =0
virtual Pointer< MessageDispatchdequeue (long long timeout)=0
 Used to get an enqueued message.
virtual Pointer< MessageDispatchdequeueNoWait ()=0
 Used to get an enqueued message if there is one queued right now.
virtual Pointer< MessageDispatchpeek () const =0
 Peek in the Queue and return the first message in the Channel without removing it from the channel.
virtual void start ()=0
 Starts dispatch of messages from the Channel.
virtual void stop ()=0
 Stops dispatch of message from the Channel.
virtual void close ()=0
 Close this channel no messages will be dispatched after this method is called.
virtual void clear ()=0
 Clear the Channel, all pending messages are removed.
virtual int size () const =0
virtual std::vector< Pointer
< MessageDispatch > > 
removeAll ()=0
 Remove all messages that are currently in the Channel and return them as a list of Messages.
- Public Member Functions inherited from decaf::util::concurrent::Synchronizable
virtual ~Synchronizable ()
virtual void lock ()=0
 Locks the object.
virtual bool tryLock ()=0
 Attempts to Lock the object, if the lock is already held by another thread than this method returns false.
virtual void unlock ()=0
 Unlocks the object.
virtual void wait ()=0
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void wait (long long millisecs)=0
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void wait (long long millisecs, int nanos)=0
 Waits on a signal from this object, which is generated by a call to Notify.
virtual void notify ()=0
 Signals a waiter on this object that it can now wake up and continue.
virtual void notifyAll ()=0
 Signals the waiters on this object that it can now wake up and continue.

Constructor & Destructor Documentation

virtual activemq::core::MessageDispatchChannel::~MessageDispatchChannel ( )
virtual

Member Function Documentation

virtual void activemq::core::MessageDispatchChannel::clear ( )
pure virtual

Clear the Channel, all pending messages are removed.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual void activemq::core::MessageDispatchChannel::close ( )
pure virtual

Close this channel no messages will be dispatched after this method is called.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual Pointer<MessageDispatch> activemq::core::MessageDispatchChannel::dequeue ( long long  timeout)
pure virtual

Used to get an enqueued message.

The amount of time this method blocks is based on the timeout value. - if timeout==-1 then it blocks until a message is received. - if timeout==0 then it it tries to not block at all, it returns a message if it is available - if timeout>0 then it blocks up to timeout amount of time. Expired messages will consumed by this method.

Returns
null if we timeout or if the consumer is closed.
Exceptions
ActiveMQException

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual Pointer<MessageDispatch> activemq::core::MessageDispatchChannel::dequeueNoWait ( )
pure virtual

Used to get an enqueued message if there is one queued right now.

If there is no waiting message than this method returns Null.

Returns
a message if there is one in the queue.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual void activemq::core::MessageDispatchChannel::enqueue ( const Pointer< MessageDispatch > &  message)
pure virtual

Add a Message to the Channel behind all pending message.

Parameters
message- The message to add to the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual void activemq::core::MessageDispatchChannel::enqueueFirst ( const Pointer< MessageDispatch > &  message)
pure virtual

Add a message to the front of the Channel.

Parameters
message- The Message to add to the front of the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual bool activemq::core::MessageDispatchChannel::isClosed ( ) const
pure virtual
virtual bool activemq::core::MessageDispatchChannel::isEmpty ( ) const
pure virtual
Returns
true if there are no messages in the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual bool activemq::core::MessageDispatchChannel::isRunning ( ) const
pure virtual
Returns
true if the Channel currently running and will dequeue message.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual Pointer<MessageDispatch> activemq::core::MessageDispatchChannel::peek ( ) const
pure virtual

Peek in the Queue and return the first message in the Channel without removing it from the channel.

Returns
a message if there is one in the queue.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual std::vector<Pointer<MessageDispatch> > activemq::core::MessageDispatchChannel::removeAll ( )
pure virtual

Remove all messages that are currently in the Channel and return them as a list of Messages.

Returns
a list of Messages that was previously in the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual int activemq::core::MessageDispatchChannel::size ( ) const
pure virtual
Returns
the number of Messages currently in the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual void activemq::core::MessageDispatchChannel::start ( )
pure virtual

Starts dispatch of messages from the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.

virtual void activemq::core::MessageDispatchChannel::stop ( )
pure virtual

Stops dispatch of message from the Channel.

Implemented in activemq::core::SimplePriorityMessageDispatchChannel, and activemq::core::FifoMessageDispatchChannel.


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