GlobalObjects
|
Serves as interface between Base or PrivateBase and Manager. In the documentation the ClientThread is also referred to as the client communicator, if NOT the server communicator (ServerThread) is meant. More...
#include <GloLocalThread.h>
Public Member Functions | |
LocalThread (const std::string &rstrSchemaPath, const std::vector< std::string > &rAllowedSchemes) | |
~LocalThread () | |
virtual int | assignDBManager (OrderMsg *pOrderMsg) override |
virtual void | cancel () override |
bool | operator== (const LocalThread &rT) const |
bool | operator!= (const LocalThread &rT) const |
Public Member Functions inherited from glo::Communicator | |
Communicator () | |
virtual | ~Communicator () |
std::string | getClientName () const |
const std::string & | getClientNameAsRef () |
unsigned int | getCommunicatorID () const |
virtual void | setClientName (const std::string &rstrClientName) |
virtual void | setCommunicatorID (unsigned int uiID) |
virtual int | takeOverResult (OrderMsg *pOrderMsg) |
bool | operator== (const Communicator &rT) const |
bool | operator!= (const Communicator &rT) const |
Public Member Functions inherited from eut::RepeatingThread | |
RepeatingThread () | |
virtual | ~RepeatingThread () |
virtual void | finishBreak () |
int | getBreakCounter () |
bool | isInExclusiveAccess () const |
void | setExclusiveAccess () |
void | signalInput () |
virtual int | start () |
RepeatingThread::STATUS | status () const |
virtual void | takeABreak () |
bool | testCancel () |
void | unsetExclusiveAccess () |
void | waitForInput () |
Protected Member Functions | |
virtual int | sendToDBManager (OrderMsg *pOrderMsg) const override |
Protected Member Functions inherited from glo::Communicator | |
virtual void | processServerMsg (OrderMsg *pOrderMsg) const |
virtual void | work () override |
Protected Member Functions inherited from eut::RepeatingThread | |
ORDER | getOrder () |
STATUS | getStatus () |
void | setStatus (STATUS eStatus) |
void | threadWork () |
void | toOrder (ORDER eOrder) |
Private Member Functions | |
LocalThread () | |
LocalThread (const LocalThread &) | |
LocalThread & | operator= (const LocalThread &) |
Private Attributes | |
Manager * | m_pDBManager |
Additional Inherited Members | |
Public Types inherited from eut::RepeatingThread | |
enum | EuTHREADERROR { EuTHREAD_ERR_NO_THREAD = -10301 , EuTHREAD_ERR_THREAD_ALREADY_WORKING = -10302 , EuTHREAD_ERR_THREAD_BREAK_COUNT_LESS_THAN_ZERO = -10303 , EuTHREAD_ERR_UNKNOWN = -10400 } |
Error range = -10301 to -10400 More... | |
enum | ORDER { eUNDEFINED , eDO_WORK , eEXIT } |
enum | STATUS { eAT_THE_START , eWORKING , ePAUSING , eENDING , eCOMPLETED } |
Public Attributes inherited from eut::RepeatingThread | |
std::string | m_strDebugInfo |
Protected Attributes inherited from glo::Communicator | |
unsigned int | m_uiOrderCounter |
Serves as interface between Base or PrivateBase and Manager. In the documentation the ClientThread is also referred to as the client communicator, if NOT the server communicator (ServerThread) is meant.
The LocalThread sends requests to the Manager and waits until the request is executed (or not).
The Manager hands over the processed request as a response to the local request and response queue. Objects of this class are necessary if the Base is called with "LOCAL" and the Manager is not available as a server but directly.
To allow parallel access to the database, this class is designed as a thread (derived via Communicator from EuEndlessPThread).
|
private |
The standard constructor is not available.
glo::LocalThread::LocalThread | ( | const std::string & | rstrSchemaPath, |
const std::vector< std::string > & | rAllowedSchemes ) |
Constructor with parameter passing.
[in] | rstrSchemaPath | The complete path name (e.g. "C:/Path/") in which the schema files are located. |
[in] | rAllowedSchemes | The permitted schemas (their names). |
eut::ErrorNException | An exception is thrown if an error occurs. |
glo::LocalThread::~LocalThread | ( | ) |
Destructor.
|
private |
The copy constructor is not available.
|
overridevirtual |
Passes an order to the Manager and waits for response.
[in] | pOrderMsg | The order for the Manager. |
Reimplemented from glo::Communicator.
|
overridevirtual |
Clears the memory before the thread is terminated. Is called in the owning PrivateBase before the thread is terminated.
Since it is virtual, this method cannot be called in the destructor.
Reimplemented from eut::RepeatingThread.
bool glo::LocalThread::operator!= | ( | const LocalThread & | rT | ) | const |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
private |
The assignment operator is not available.
bool glo::LocalThread::operator== | ( | const LocalThread & | rT | ) | const |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
overrideprotectedvirtual |
Passes an order (received via LocalThread::assignDBManager() ) directly to the Manager.
[in] | pOrderMsg | The order for the Manager. |
Implements glo::Communicator.