GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Baseclass for all instances that can own a TGo4Task. More...
#include <TGo4TaskOwner.h>
Public Member Functions | |
TGo4TaskOwner () | |
TGo4TaskOwner (Bool_t isserver) | |
virtual | ~TGo4TaskOwner () |
const char * | GetName () const |
TGo4Task * | GetTask () const |
TMutex * | GetTaskManagerMutex () |
Access to taskmanager mutex; to be locked outside main mutex. | |
Bool_t | IsBeingQuit () |
Bool_t | IsConnected () |
Bool_t | IsServer () const |
virtual void | Quit () |
Quit this instance and the owned task; method to be called from command object, may be overridden in user implementation. | |
virtual Int_t | StartWorkThreads () |
Start the working threads of the task owner implementation; this method is used after the current connection has changed, to continue reading/writing the queues. | |
virtual Int_t | StopWorkThreads () |
stop the working threads of the task owne implementation; this method is used before the current connection is changed to prevent reading/writing and waiting for the wrong queues. | |
![]() | |
TGo4CommandReceiver () | |
virtual | ~TGo4CommandReceiver () |
Protected Member Functions | |
void | SetTask (TGo4Task *task, Bool_t delold=kTRUE) |
Private Attributes | |
Bool_t | fbServerMode {kFALSE} |
Flag if master uses servertask or client task connection. | |
TGo4Task * | fxTask {nullptr} |
aggregation 1 1 | |
Friends | |
class | TGo4ServerTask |
class | TGo4Task |
Baseclass for all instances that can own a TGo4Task.
Bridge between client/server functionality and master/slave.
Definition at line 30 of file TGo4TaskOwner.h.
TGo4TaskOwner::TGo4TaskOwner | ( | ) |
Definition at line 24 of file TGo4TaskOwner.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fbServerMode, and fxTask.
Referenced by TGo4Master::TGo4Master(), TGo4Master::TGo4Master(), and TGo4Slave::TGo4Slave().
TGo4TaskOwner::TGo4TaskOwner | ( | Bool_t | isserver | ) |
Definition at line 31 of file TGo4TaskOwner.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fbServerMode, and fxTask.
|
virtual |
Definition at line 38 of file TGo4TaskOwner.cxx.
References fxTask.
const char * TGo4TaskOwner::GetName | ( | ) | const |
Definition at line 46 of file TGo4TaskOwner.cxx.
References fxTask.
Referenced by TGo4AnalysisClient::TGo4AnalysisClient(), TGo4AnalysisClient::TGo4AnalysisClient(), TGo4AnalysisClient::Constructor(), TGo4AnalysisClient::CreateStatus(), TGo4Slave::CreateStatus(), TGo4AnalysisClient::Initialization(), IsConnected(), TGo4AnalysisClient::KillMain(), TGo4AnalysisClient::RestartMain(), TGo4AnalysisClient::Start(), TGo4Slave::Start(), TGo4AnalysisClient::Stop(), and TGo4Slave::Stop().
|
inline |
Definition at line 44 of file TGo4TaskOwner.h.
References fxTask, and TGo4Task.
Referenced by TGo4Display::TGo4Display(), TGo4Display::~TGo4Display(), TGo4AnalysisClient::Constructor(), TGo4Master::DisconnectSlave(), GetTaskManagerMutex(), TGo4Slave::GetThreadHandler(), IsConnected(), TGo4AnalysisClient::KillMain(), TGo4Slave::NextCommand(), TGo4AnalysisClient::RestartMain(), TGo4Slave::SendObject(), TGo4Slave::SendStatus(), TGo4Slave::SendStatusBuffer(), TGo4Slave::SendStatusMessage(), TGo4AnalysisClient::Stop(), TGo4Master::SubmitCommand(), TGo4Master::SubmitCommand(), TGo4Master::SubmitEmergencyCommand(), TGo4AnalysisClient::SubmitShutdown(), TGo4AnalysisClient::Terminate(), TGo4Slave::Terminate(), TGo4AnalysisClient::TerminateFast(), TGo4Slave::UpdateStatus(), and TGo4Slave::UpdateStatusBuffer().
TMutex * TGo4TaskOwner::GetTaskManagerMutex | ( | ) |
Access to taskmanager mutex; to be locked outside main mutex.
Definition at line 102 of file TGo4TaskOwner.cxx.
References TGo4TaskManager::GetMutex(), GetTask(), TGo4ServerTask::GetTaskManager(), IsServer(), and TGo4ServerTask.
Bool_t TGo4TaskOwner::IsBeingQuit | ( | ) |
Definition at line 97 of file TGo4TaskOwner.cxx.
References fxTask.
Bool_t TGo4TaskOwner::IsConnected | ( | ) |
Definition at line 77 of file TGo4TaskOwner.cxx.
References TGo4ServerTask::GetCurrentTaskHandler(), GetName(), GetTask(), TGo4ClientTask::IsConnected(), IsServer(), and TGo4ServerTask.
|
inline |
Definition at line 42 of file TGo4TaskOwner.h.
References fbServerMode.
Referenced by TGo4Master::TGo4Master(), TGo4Slave::TGo4Slave(), TGo4AnalysisClient::Constructor(), TGo4Master::DisconnectSlave(), GetTaskManagerMutex(), TGo4TaskHandlerAbortException::Handle(), and IsConnected().
|
virtual |
Quit this instance and the owned task; method to be called from command object, may be overridden in user implementation.
Reimplemented in TGo4AnalysisClient.
Definition at line 58 of file TGo4TaskOwner.cxx.
References fxTask.
|
protected |
Definition at line 51 of file TGo4TaskOwner.cxx.
References fxTask, and TGo4Task.
Referenced by TGo4Master::TGo4Master(), and TGo4Slave::TGo4Slave().
|
virtual |
Start the working threads of the task owner implementation; this method is used after the current connection has changed, to continue reading/writing the queues.
To be overridden.
Reimplemented in TGo4AnalysisClient.
Definition at line 63 of file TGo4TaskOwner.cxx.
References TGo4Log::Debug(), and fxTask.
Referenced by TGo4AnalysisClient::StartWorkThreads().
|
virtual |
stop the working threads of the task owne implementation; this method is used before the current connection is changed to prevent reading/writing and waiting for the wrong queues.
To be overridden.
Reimplemented in TGo4AnalysisClient.
Definition at line 70 of file TGo4TaskOwner.cxx.
References TGo4Log::Debug(), and fxTask.
Referenced by TGo4AnalysisClient::StopWorkThreads().
|
friend |
Definition at line 32 of file TGo4TaskOwner.h.
References TGo4ServerTask.
Referenced by TGo4Master::TGo4Master(), TGo4Slave::TGo4Slave(), TGo4Master::DisconnectSlave(), GetTaskManagerMutex(), IsConnected(), and TGo4ServerTask.
|
friend |
Definition at line 31 of file TGo4TaskOwner.h.
References TGo4Task.
Referenced by TGo4Master::TGo4Master(), TGo4Slave::TGo4Slave(), GetTask(), SetTask(), and TGo4Task.
|
private |
Flag if master uses servertask or client task connection.
Definition at line 84 of file TGo4TaskOwner.h.
Referenced by TGo4TaskOwner(), TGo4TaskOwner(), and IsServer().
|
private |
aggregation 1 1
Definition at line 81 of file TGo4TaskOwner.h.
Referenced by TGo4TaskOwner(), TGo4TaskOwner(), ~TGo4TaskOwner(), GetName(), GetTask(), IsBeingQuit(), Quit(), SetTask(), StartWorkThreads(), and StopWorkThreads().