activemq-cpp-3.4.0
|
A Task Runner that can contain one or more CompositeTasks that are each checked for pending work and run if any is present in the order that the tasks were added. More...
#include <src/main/activemq/threads/CompositeTaskRunner.h>
Public Member Functions | |
CompositeTaskRunner () | |
virtual | ~CompositeTaskRunner () |
void | addTask (CompositeTask *task) |
Adds a new CompositeTask to the Set of Tasks that this class manages. | |
void | removeTask (CompositeTask *task) |
Removes a CompositeTask that was added previously. | |
virtual void | shutdown (unsigned int timeout) |
Shutdown after a timeout, does not guarantee that the task's iterate method has completed and the thread halted. | |
virtual void | shutdown () |
Shutdown once the task has finished and the TaskRunner's thread has exited. | |
virtual void | wakeup () |
Signal the TaskRunner to wakeup and execute another iteration cycle on the task, the Task instance will be run until its iterate method has returned false indicating it is done. | |
Protected Member Functions | |
virtual void | run () |
Run method - called by the Thread class in the context of the thread. | |
virtual bool | iterate () |
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. |
A Task Runner that can contain one or more CompositeTasks that are each checked for pending work and run if any is present in the order that the tasks were added.
activemq::threads::CompositeTaskRunner::CompositeTaskRunner | ( | ) |
virtual activemq::threads::CompositeTaskRunner::~CompositeTaskRunner | ( | ) | [virtual] |
void activemq::threads::CompositeTaskRunner::addTask | ( | CompositeTask * | task | ) |
Adds a new CompositeTask to the Set of Tasks that this class manages.
task | - Pointer to a CompositeTask instance. |
virtual bool activemq::threads::CompositeTaskRunner::iterate | ( | ) | [protected, virtual] |
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.
Implements activemq::threads::Task.
void activemq::threads::CompositeTaskRunner::removeTask | ( | CompositeTask * | task | ) |
Removes a CompositeTask that was added previously.
task | - Pointer to a CompositeTask instance. |
virtual void activemq::threads::CompositeTaskRunner::run | ( | ) | [protected, virtual] |
Run method - called by the Thread class in the context of the thread.
Implements decaf::lang::Runnable.
virtual void activemq::threads::CompositeTaskRunner::shutdown | ( | ) | [virtual] |
Shutdown once the task has finished and the TaskRunner's thread has exited.
Implements activemq::threads::TaskRunner.
virtual void activemq::threads::CompositeTaskRunner::shutdown | ( | unsigned int | timeout | ) | [virtual] |
Shutdown after a timeout, does not guarantee that the task's iterate method has completed and the thread halted.
timeout | - Time in Milliseconds to wait for the task to stop. |
Implements activemq::threads::TaskRunner.
virtual void activemq::threads::CompositeTaskRunner::wakeup | ( | ) | [virtual] |
Signal the TaskRunner to wakeup and execute another iteration cycle on the task, the Task instance will be run until its iterate method has returned false indicating it is done.
Implements activemq::threads::TaskRunner.