![]() |
Base thread that must be inherited to provide useful functionality to a service. More...
#include <Service.h>
Public Member Functions | |
ServiceThread (string pName) | |
virtual | ~ServiceThread () |
const string & | statusRef () const |
void | log (string pData) |
![]() | |
Thread (const char *pType) | |
virtual | ~Thread () |
const char * | namePtr () const |
bool | dispatch () |
Lets the thread to start working. | |
int | join () |
Wait until the internal thread's memory structures are finished. | |
void | finish () |
Advise the thread for not continuing executing the perform method. | |
bool | finishRequested () const |
Indicates if a finish was executed on this thread. | |
void | relocate (string pDestination) |
Moves the thread to the specified destination. | |
![]() | |
string & | lastErrorRef () |
Returns a reference to the last stored error message. | |
ErrorCode | lastCode () |
Returns the last stored code. | |
bool | valid () |
Permits to know if the object has a valid internal state. | |
string & | typeRef () |
Permits to know the type of this particular object. | |
Protected Member Functions | |
virtual bool | prepare () |
Provides a placeholder for the class to initialize internal data. | |
virtual void | dispose () |
If the prepare and perform method where successful, the dispose must deinitialize everything was initialized during the prepare method. | |
![]() | |
Thread (const char *pType, string &pReceivedState) | |
This is the protected constructor will be used by the distributed rebuilder. | |
virtual int | perform ()=0 |
Performs the internal processing cycle for the thread. | |
virtual void | d_packState (string &pStateData) |
Permits to package the thread contents to be send to another process or computer to continue working. | |
virtual bool | d_sendToDestination (string &pStateData) |
Sends the thread state to the destination. | |
virtual void | d_restoreState (string &pSource) |
Rebuilds the internal state for the thread. | |
![]() | |
HSEPObject (const char *pType) | |
Constructor, providing the base for the state controlling instance. | |
virtual | ~HSEPObject () |
void | setLastError (string &pErrorMsgRef) |
Assigns an error message text to the last executed operation. | |
void | setLastError (const string &pErrorMsgRef) |
Assigns an error message text to the last executed operation. | |
void | setLastError (const char *pErrorMsg) |
Assigns an error message text to the last executed operation. | |
void | setValid () |
Defines that the object has a valid state. | |
void | setInvalid () |
Defines that the object has an invalid state. | |
void | setLastCode (const ErrorCode pErrorCode) |
Defines the internal result code for the object. | |
Additional Inherited Members | |
![]() | |
Mutex | aMutex |
Base thread that must be inherited to provide useful functionality to a service.
The corresponding derived thread must be provided by the ServiceThreadFactory class.
HSEP::ServiceThread::ServiceThread | ( | string | pName | ) |
Definition at line 76 of file Service.cpp.
|
virtual |
Definition at line 83 of file Service.cpp.
|
protectedvirtual |
If the prepare and perform method where successful, the dispose must deinitialize everything was initialized during the prepare method.
Implements HSEP::Thread.
Definition at line 57 of file Service.cpp.
References HSEP::LT_SYSTEMERROR, and HSEP::LoggerTool::send().
void HSEP::ServiceThread::log | ( | string | pData | ) |
Definition at line 69 of file Service.cpp.
References HSEP::Thread::aMutex.
|
protectedvirtual |
Provides a placeholder for the class to initialize internal data.
Implements HSEP::Thread.
Definition at line 32 of file Service.cpp.
References HSEP::LT_SYSTEMERROR, and HSEP::LoggerTool::send().
|
inline |