activemq-cpp-3.9.5
activemq::util::ServiceSupport Class Referenceabstract

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.
 
- Public Member Functions inherited from activemq::util::Service
virtual ~Service ()
 

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

◆ ServiceSupport() [1/2]

activemq::util::ServiceSupport::ServiceSupport ( const ServiceSupport & )

References ServiceSupport().

Referenced by operator=(), and ServiceSupport().

◆ ServiceSupport() [2/2]

activemq::util::ServiceSupport::ServiceSupport ( )

◆ ~ServiceSupport()

virtual activemq::util::ServiceSupport::~ServiceSupport ( )
virtual

Member Function Documentation

◆ addServiceListener()

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

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

◆ dispose()

static void activemq::util::ServiceSupport::dispose ( Service * service)
static

Safely shuts down a service.

Parameters
serviceThe service to stop.

◆ doStart()

virtual void activemq::util::ServiceSupport::doStart ( )
protectedpure 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.

◆ doStop()

virtual void activemq::util::ServiceSupport::doStop ( ServiceStopper * stopper)
protectedpure 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.

◆ isStarted()

bool activemq::util::ServiceSupport::isStarted ( ) const
Returns
true if this service has been started

◆ isStopped()

bool activemq::util::ServiceSupport::isStopped ( ) const
Returns
true if this service is closed

◆ isStopping()

bool activemq::util::ServiceSupport::isStopping ( ) const
Returns
true if this service is in the process of closing

◆ operator=()

ServiceSupport & activemq::util::ServiceSupport::operator= ( const ServiceSupport & )

References ServiceSupport().

◆ removeServiceListener()

void activemq::util::ServiceSupport::removeServiceListener ( ServiceListener * llistener)

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

◆ start()

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

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

Implements activemq::util::Service.

◆ stop()

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

Stops the Service.

Implements activemq::util::Service.


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