activemq-cpp-3.6.0
activemq::threads::Scheduler Class Reference

Scheduler class for use in executing Runnable Tasks either periodically or one time only with optional delay. More...

#include <src/main/activemq/threads/Scheduler.h>

Inheritance diagram for activemq::threads::Scheduler:

Public Member Functions

 Scheduler (const std::string &name)
virtual ~Scheduler ()
void executePeriodically (decaf::lang::Runnable *task, long long period, bool ownsTask=true)
void schedualPeriodically (decaf::lang::Runnable *task, long long period, bool ownsTask=true)
void cancel (decaf::lang::Runnable *task)
void executeAfterDelay (decaf::lang::Runnable *task, long long delay, bool ownsTask=true)
void shutdown ()
- Public Member Functions inherited from activemq::util::ServiceSupport
 ServiceSupport (const ServiceSupport &)
ServiceSupportoperator= (const ServiceSupport &)
 ServiceSupport ()
virtual ~ServiceSupport ()
void start ()
 Starts the Service, notifying any registered listeners of the start if it is successful.
void stop ()
 Stops the Service.
bool isStarted () const
bool isStopping () const
bool isStopped () const
void addServiceListener (ServiceListener *listener)
 Adds the given listener to this Service's list of listeners, call retains ownership of the pointer.
void removeServiceListener (ServiceListener *llistener)
 Removes the given listener to this Service's list of listeners, call retains ownership of the pointer.
- Public Member Functions inherited from activemq::util::Service
virtual ~Service ()

Protected Member Functions

virtual void doStart ()
 Performs the actual start operation on the service, acquiring all the resources needed to run the service.
virtual void doStop (activemq::util::ServiceStopper *stopper)
 Performs the actual stop operation on the service, ensuring that all resources held are released, must be implemented in derived class.

Additional Inherited Members

- Static Public Member Functions inherited from activemq::util::ServiceSupport
static void dispose (Service *service)
 Safely shuts down a service.

Detailed Description

Scheduler class for use in executing Runnable Tasks either periodically or one time only with optional delay.

Since
3.3.0

Constructor & Destructor Documentation

activemq::threads::Scheduler::Scheduler ( const std::string &  name)
virtual activemq::threads::Scheduler::~Scheduler ( )
virtual

Member Function Documentation

void activemq::threads::Scheduler::cancel ( decaf::lang::Runnable task)
virtual void activemq::threads::Scheduler::doStart ( )
protectedvirtual

Performs the actual start operation on the service, acquiring all the resources needed to run the service.

Must be implemented in derived class.

Implements activemq::util::ServiceSupport.

virtual void activemq::threads::Scheduler::doStop ( activemq::util::ServiceStopper stopper)
protectedvirtual

Performs the actual stop operation on the service, ensuring that all resources held are released, must be implemented in derived class.

Implements activemq::util::ServiceSupport.

void activemq::threads::Scheduler::executeAfterDelay ( decaf::lang::Runnable task,
long long  delay,
bool  ownsTask = true 
)
void activemq::threads::Scheduler::executePeriodically ( decaf::lang::Runnable task,
long long  period,
bool  ownsTask = true 
)
void activemq::threads::Scheduler::schedualPeriodically ( decaf::lang::Runnable task,
long long  period,
bool  ownsTask = true 
)
void activemq::threads::Scheduler::shutdown ( )

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