GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Class that knows Command Object; When Client gets the Command it is passed to the Invoker who sets the CommandClient as receiver and calls its Execute method. More...
#include <TGo4CommandInvoker.h>
Public Member Functions | |
virtual | ~TGo4CommandInvoker () |
Int_t | ExecuteFromRemote (TGo4RemoteCommand *remcom) |
Create real command from remote command and invoke it. | |
virtual void | Invoke () |
virtual void | Invoke (TGo4Command *com) |
![]() | |
TGo4CommandReceiver () | |
virtual | ~TGo4CommandReceiver () |
Static Public Member Functions | |
static TGo4CommandInvoker * | Instance () |
static void | Register (const char *name, TGo4CommandReceiver *p) |
static void | SetCommandList (TGo4CommandProtoList *list) |
Application may exchange standard command list by own subclass with specialized commands, e.g. | |
static void | UnRegister (TGo4CommandReceiver *p) |
Protected Member Functions | |
TGo4CommandInvoker () | |
Static Protected Member Functions | |
static TGo4CommandReceiver * | Lookup (const char *name) |
Private Attributes | |
TGo4Command * | fxCommand {nullptr} |
aggregation | |
Static Private Attributes | |
static TObjArray * | fxArray = nullptr |
static TGo4CommandProtoList * | fxCommandList = nullptr |
For remote commands, invoker will create the requested slave commands from own command list. | |
static TGo4CommandInvoker * | fxInstance = nullptr |
static TMutex * | fxMutex = nullptr |
Class that knows Command Object; When Client gets the Command it is passed to the Invoker who sets the CommandClient as receiver and calls its Execute method.
Decouples CommandClient and Command object circular dependencies
Definition at line 37 of file TGo4CommandInvoker.h.
|
virtual |
Definition at line 59 of file TGo4CommandInvoker.cxx.
References fxArray, fxCommand, fxCommandList, fxMutex, and GO4TRACE.
|
protected |
Definition at line 47 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fxArray, fxCommand, fxCommandList, fxMutex, GO4TRACE, and Register().
Referenced by Instance().
Int_t TGo4CommandInvoker::ExecuteFromRemote | ( | TGo4RemoteCommand * | remcom | ) |
Create real command from remote command and invoke it.
Used when remote command acts on this invoker as receiver
Definition at line 151 of file TGo4CommandInvoker.cxx.
References fxCommandList, TGo4Command::GetMode(), TGo4Command::GetTaskName(), Invoke(), TGo4Command::SetMode(), and TGo4Command::SetTaskName().
Referenced by TGo4RemoteCommand::ExeCom().
|
static |
Definition at line 69 of file TGo4CommandInvoker.cxx.
References TGo4CommandInvoker(), fxInstance, and GO4TRACE.
Referenced by TGo4CommandRunnable::TGo4CommandRunnable(), TGo4ExampleApplication::TGo4ExampleApplication(), TGo4HistogramServer::TGo4HistogramServer(), TGo4HistogramServer::TGo4HistogramServer(), TGo4Master::TGo4Master(), TGo4ServerTask::TGo4ServerTask(), TGo4Slave::TGo4Slave(), TGo4Task::TGo4Task(), TGo4Analysis::Constructor(), TGo4AnalysisClient::Constructor(), TGo4AnalysisMainRunnable::Run(), TGo4LocalCommandRunnable::Run(), and TGo4MainRunnable::Run().
|
virtual |
Definition at line 129 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fxCommand, fxMutex, GO4TRACE, Lookup(), and TGo4LockGuard.
Referenced by ExecuteFromRemote().
|
virtual |
Definition at line 113 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), TGo4Log::Debug(), TGo4Command::ExeCom(), fxMutex, TGo4Command::GetMode(), TGo4Command::GetProtection(), TGo4Command::GetReceiverName(), GO4TRACE, Lookup(), TGo4Command::RefuseCom(), TGo4Command::SetReceiver(), and TGo4LockGuard.
Referenced by TGo4AnalysisMainRunnable::Run(), TGo4LocalCommandRunnable::Run(), and TGo4MainRunnable::Run().
|
staticprotected |
Definition at line 105 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fxArray, TGo4Pair::GetReceiver(), and GO4TRACE.
|
static |
Definition at line 77 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), fxArray, fxMutex, GO4TRACE, and TGo4LockGuard.
Referenced by TGo4CommandInvoker(), TGo4ExampleApplication::TGo4ExampleApplication(), TGo4HistogramServer::TGo4HistogramServer(), TGo4HistogramServer::TGo4HistogramServer(), TGo4Master::TGo4Master(), TGo4ServerTask::TGo4ServerTask(), TGo4Slave::TGo4Slave(), TGo4Task::TGo4Task(), TGo4Analysis::Constructor(), and TGo4AnalysisClient::Constructor().
|
static |
Application may exchange standard command list by own subclass with specialized commands, e.g.
for analysis control
Definition at line 145 of file TGo4CommandInvoker.cxx.
References fxCommandList.
Referenced by TGo4Slave::TGo4Slave(), TGo4Task::TGo4Task(), TGo4Analysis::Constructor(), and TGo4AnalysisClient::Constructor().
|
static |
Definition at line 84 of file TGo4CommandInvoker.cxx.
References TGo4CommandReceiver::TGo4CommandReceiver(), TGo4Log::Error(), fxArray, fxMutex, TGo4Pair::GetReceiver(), GO4TRACE, and TGo4LockGuard.
Referenced by TGo4Analysis::~TGo4Analysis(), TGo4AnalysisClient::~TGo4AnalysisClient(), TGo4ExampleApplication::~TGo4ExampleApplication(), TGo4HistogramServer::~TGo4HistogramServer(), TGo4Master::~TGo4Master(), TGo4ServerTask::~TGo4ServerTask(), TGo4Slave::~TGo4Slave(), and TGo4Task::~TGo4Task().
|
staticprivate |
Definition at line 77 of file TGo4CommandInvoker.h.
Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), Lookup(), Register(), and UnRegister().
|
private |
aggregation
Definition at line 70 of file TGo4CommandInvoker.h.
Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), and Invoke().
|
staticprivate |
For remote commands, invoker will create the requested slave commands from own command list.
Definition at line 74 of file TGo4CommandInvoker.h.
Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), ExecuteFromRemote(), and SetCommandList().
|
staticprivate |
Definition at line 76 of file TGo4CommandInvoker.h.
Referenced by Instance().
|
staticprivate |
Definition at line 78 of file TGo4CommandInvoker.h.
Referenced by TGo4CommandInvoker(), ~TGo4CommandInvoker(), Invoke(), Invoke(), Register(), and UnRegister().