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

Delegate dispatcher for a single session. More...

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

Inheritance diagram for activemq::core::ActiveMQSessionExecutor:

Public Member Functions

 ActiveMQSessionExecutor (activemq::core::kernels::ActiveMQSessionKernel *session)
 Creates an un-started executor for the given session.
virtual ~ActiveMQSessionExecutor ()
 Calls stop() then clear().
virtual void execute (const Pointer< MessageDispatch > &data)
 Executes the dispatch.
virtual void executeFirst (const Pointer< MessageDispatch > &data)
 Executes the dispatch.
virtual void clearMessagesInProgress ()
 Removes all messages in the Dispatch Channel so that non are delivered.
virtual bool hasUncomsumedMessages () const
virtual void wakeup ()
 wakeup this executer and dispatch any pending messages.
virtual void start ()
 Starts the dispatching.
virtual void stop ()
 Stops dispatching.
virtual void close ()
 Terminates the dispatching thread.
virtual bool isRunning () const
virtual bool isEmpty ()
virtual void clear ()
 Removes all queued messages and destroys them.
virtual bool iterate ()
 Iterates on the MessageDispatchChannel sending all pending messages to the Consumers they are destined for.
std::vector< Pointer
< MessageDispatch > > 
getUnconsumedMessages ()

Additional Inherited Members

- Private Member Functions inherited from activemq::threads::Task
virtual ~Task ()
virtual bool iterate ()=0
 Perform one iteration of work, returns true if the task needs to run again to complete or false to indicate that the task is now complete.

Detailed Description

Delegate dispatcher for a single session.

Contains a thread to provide for asynchronous dispatching.

Constructor & Destructor Documentation

activemq::core::ActiveMQSessionExecutor::ActiveMQSessionExecutor ( activemq::core::kernels::ActiveMQSessionKernel session)

Creates an un-started executor for the given session.

virtual activemq::core::ActiveMQSessionExecutor::~ActiveMQSessionExecutor ( )
virtual

Calls stop() then clear().

Member Function Documentation

virtual void activemq::core::ActiveMQSessionExecutor::clear ( )
inlinevirtual

Removes all queued messages and destroys them.

virtual void activemq::core::ActiveMQSessionExecutor::clearMessagesInProgress ( )
inlinevirtual

Removes all messages in the Dispatch Channel so that non are delivered.

virtual void activemq::core::ActiveMQSessionExecutor::close ( )
inlinevirtual

Terminates the dispatching thread.

Once this is called, the executor is no longer usable.

virtual void activemq::core::ActiveMQSessionExecutor::execute ( const Pointer< MessageDispatch > &  data)
virtual

Executes the dispatch.

Adds the given data to the end of the queue.

Parameters
data- the data to be dispatched.
virtual void activemq::core::ActiveMQSessionExecutor::executeFirst ( const Pointer< MessageDispatch > &  data)
virtual

Executes the dispatch.

Adds the given data to the beginning of the queue.

Parameters
data- the data to be dispatched.
std::vector< Pointer<MessageDispatch> > activemq::core::ActiveMQSessionExecutor::getUnconsumedMessages ( )
inline
Returns
a vector containing all the unconsumed messages, this clears the Message Dispatch Channel when called.
virtual bool activemq::core::ActiveMQSessionExecutor::hasUncomsumedMessages ( ) const
inlinevirtual
Returns
true if there are any pending messages in the dispatch channel.
virtual bool activemq::core::ActiveMQSessionExecutor::isEmpty ( )
inlinevirtual
Returns
true if there are no messages in the Dispatch Channel.
virtual bool activemq::core::ActiveMQSessionExecutor::isRunning ( ) const
inlinevirtual
Returns
true indicates if the executor is started
virtual bool activemq::core::ActiveMQSessionExecutor::iterate ( )
virtual

Iterates on the MessageDispatchChannel sending all pending messages to the Consumers they are destined for.

Returns
false if there are no more messages to dispatch.
virtual void activemq::core::ActiveMQSessionExecutor::start ( )
virtual

Starts the dispatching.

virtual void activemq::core::ActiveMQSessionExecutor::stop ( )
virtual

Stops dispatching.

virtual void activemq::core::ActiveMQSessionExecutor::wakeup ( )
virtual

wakeup this executer and dispatch any pending messages.


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