API Guides > ConceptRT 3.x
BaseService Class Referenceabstract

Base class for Service. More...

Detailed Description

Base class for Service.

+ Inheritance diagram for BaseService:

Public Member Methods

 BaseService (BaseServiceController &serviceController)
 Constuctor. More...
 
void SetPeriod (TimeSpan period)
 Set the period of the service. More...
 
TimeSpan GetPeriod () const
 Gets the service period. More...
 

Protected Member Functions

virtual void InitialExecute ()
 Initial execution of the service. More...
 
virtual void CyclicExecute ()=0
 Cyclic execution of the service. More...
 
virtual void FinalExecute ()
 Final execution of the service. More...
 
void UnregisterServiceController ()
 Method used by inherited class to unregister the service controller. More...
 
void RegisterServiceController ()
 Method used by inherited class to register the service controller once completely created. More...
 

Constructor & Destructor Documentation

BaseService ( BaseServiceController serviceController)

Constuctor.

Parameters
serviceControllerthe service controller of the service category.

Methods Documentation

virtual void CyclicExecute ( )
protectedpure virtual

Cyclic execution of the service.

Note
The execution should not block the caller thread.

Implemented in DelegateBackgroundService, and BasePersistent.

virtual void FinalExecute ( )
inlineprotectedvirtual

Final execution of the service.

Reimplemented in BasePersistent.

TimeSpan GetPeriod ( ) const

Gets the service period.

Returns
The period.
virtual void InitialExecute ( )
inlineprotectedvirtual

Initial execution of the service.

void RegisterServiceController ( )
protected

Method used by inherited class to register the service controller once completely created.

void SetPeriod ( TimeSpan  period)

Set the period of the service.

Parameters
periodThe period

The service mechanism is waked up every milliseconds. The period should not by smaller than 1 milliseconds. The period value will be a discret number of milliseconds (ceil).

void UnregisterServiceController ( )
protected

Method used by inherited class to unregister the service controller.

Private access allowed only by friend BaseService.