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:
Inheritance graph
[legend]

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 ()

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 (  )  [inline, virtual]

Removes all queued messages and destroys them.

virtual void activemq::core::ActiveMQSessionExecutor::clearMessagesInProgress (  )  [inline, virtual]

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

virtual void activemq::core::ActiveMQSessionExecutor::close (  )  [inline, virtual]

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 [inline, virtual]
Returns:
true if there are any pending messages in the dispatch channel.
virtual bool activemq::core::ActiveMQSessionExecutor::isEmpty (  )  [inline, virtual]
Returns:
true if there are no messages in the Dispatch Channel.
virtual bool activemq::core::ActiveMQSessionExecutor::isRunning (  )  const [inline, virtual]
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.

Implements activemq::threads::Task.

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:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1