activemq-cpp-3.4.0

activemq::util::ServiceSupport Class Reference

Provides a base class for Service implementations. More...

#include <src/main/activemq/util/ServiceSupport.h>

Inheritance diagram for activemq::util::ServiceSupport:

Public Member Functions

 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.

Static Public Member Functions

static void dispose (Service *service)
 Safely shuts down a service.

Protected Member Functions

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

Detailed Description

Provides a base class for Service implementations.

Since:
3.3.0

Constructor & Destructor Documentation

activemq::util::ServiceSupport::ServiceSupport ( const ServiceSupport )
activemq::util::ServiceSupport::ServiceSupport ( )
virtual activemq::util::ServiceSupport::~ServiceSupport ( ) [virtual]

Member Function Documentation

void activemq::util::ServiceSupport::addServiceListener ( ServiceListener listener)

Adds the given listener to this Service's list of listeners, call retains ownership of the pointer.

static void activemq::util::ServiceSupport::dispose ( Service service) [static]

Safely shuts down a service.

Parameters:
serviceThe service to stop.
virtual void activemq::util::ServiceSupport::doStart ( ) [protected, pure virtual]

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

Must be implemented in derived class.

Implemented in activemq::threads::Scheduler.

virtual void activemq::util::ServiceSupport::doStop ( ServiceStopper stopper) [protected, pure virtual]

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

Implemented in activemq::threads::Scheduler.

bool activemq::util::ServiceSupport::isStarted ( ) const
Returns:
true if this service has been started
bool activemq::util::ServiceSupport::isStopped ( ) const
Returns:
true if this service is closed
bool activemq::util::ServiceSupport::isStopping ( ) const
Returns:
true if this service is in the process of closing
ServiceSupport& activemq::util::ServiceSupport::operator= ( const ServiceSupport )
void activemq::util::ServiceSupport::removeServiceListener ( ServiceListener llistener)

Removes the given listener to this Service's list of listeners, call retains ownership of the pointer.

void activemq::util::ServiceSupport::start ( ) [virtual]

Starts the Service, notifying any registered listeners of the start if it is successful.

Implements activemq::util::Service.

void activemq::util::ServiceSupport::stop ( ) [virtual]

Stops the Service.

Implements activemq::util::Service.


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