API Guides > ConceptRT 3.x
BaseServiceController Class Reference

Base class for service controller. More...

Detailed Description

Base class for service controller.

+ Inheritance diagram for BaseServiceController:

Public Member Methods

 BaseServiceController (Int32 stackSize=DefaultStackSize)
 Constructor. More...
 
void SetName (PCChar8 name)
 Gets the service controller name. More...
 
const StringGetName ()
 Gets the service controller name. More...
 
bool GetEnabled () const
 Query if the service controller is enabled . More...
 
void SetEnabled (bool value)
 Enable the service controller . More...
 
void SetEnabledSync (bool value)
 Enable the service controller with concurrent acces management. More...
 
void RequestTerminate ()
 Ask the termination of the service controller. More...
 
bool WaitTerminated (TimeSpan timeout=TimeInfinite)
 Wait for the service controller to terminate. More...
 
void SetPriority (ThreadPriority priority)
 Sets the priority of the service controller thread. More...
 
ThreadPriority GetPriority ()
 Gets the priority of the service controller thread. More...
 
const IReferenceList< BaseService > & GetServices () const
 Gets the registered services. More...
 

Constructor & Destructor Documentation

Constructor.

Parameters
stackSize(optional) size of the thread service stack. Default = DefaultStackSize.

Methods Documentation

bool GetEnabled ( ) const

Query if the service controller is enabled .

Returns
True if yes, no if not.
const String& GetName ( )

Gets the service controller name.

Returns
The service controller name.
Version
3.4 or greater feature.
ThreadPriority GetPriority ( )

Gets the priority of the service controller thread.

Returns
The priority.
const IReferenceList<BaseService>& GetServices ( ) const
inline

Gets the registered services.

Returns
The services.
void RequestTerminate ( )

Ask the termination of the service controller.

void SetEnabled ( bool  value)

Enable the service controller .

Parameters
valueenable if true, diabled if not.
See also
SetEnableSync
void SetEnabledSync ( bool  value)

Enable the service controller with concurrent acces management.

Parameters
valueenable if true, diabled if not.
See also
SetEnable
void SetName ( PCChar8  name)

Gets the service controller name.

Parameters
nameName of the thread.
Warning
Calling this method after SetEnalbe will change the service name only locally. Thus the name may be not changed in underneath OS object (for debug purpose).
Version
3.4 or greater feature.
void SetPriority ( ThreadPriority  priority)

Sets the priority of the service controller thread.

Parameters
priorityThe priority.
bool WaitTerminated ( TimeSpan  timeout = TimeInfinite)

Wait for the service controller to terminate.

Parameters
timeout(optional) the time out. Default = TimeInfinite
Returns
true if it succeeds, false if a timeout occurs.