00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4WatchRunnable.h"
00017
00018 #include "TGo4Log.h"
00019 #include "TGo4Thread.h"
00020 #include "TGo4ClientStatus.h"
00021
00022 const UInt_t TGo4WatchRunnable::fguWATCHINTERVAL=5000;
00023
00024 TGo4WatchRunnable::TGo4WatchRunnable(const char* name, TGo4ExampleClient* cli)
00025 : TGo4Runnable(name,cli)
00026 {
00027 TRACE((15,"TGo4WatchRunnable::TGo4WatchRunnable(Text_t*,TGo4ExampleClient*) constructor",__LINE__, __FILE__));
00028 fxApplication=cli->GetApplication();
00029 }
00030
00031 TGo4WatchRunnable::~TGo4WatchRunnable()
00032 {
00033 TRACE((15,"TGo4WatchRunnable::~TGo4WatchRunnable() destructor",__LINE__, __FILE__));
00034
00035 }
00036
00037 Int_t TGo4WatchRunnable::Run(void*)
00038 {
00039 TRACE((12,"TGo4WatchRunnable::Run()",__LINE__, __FILE__));
00040 TGo4ClientTask* cli= dynamic_cast<TGo4ClientTask*> (fxManager);
00041 if(cli)
00042 {
00043 cli->UpdateStatusBuffer();
00044 cli->SendStatusBuffer();
00045
00046
00047
00048 if(fxApplication)
00049 {
00050 cli->SendStatusMessage(1,kTRUE,"Application %s of client %s has been watched",
00051 fxApplication->GetName(),
00052 cli->GetName());
00053
00054
00055 }
00056 }
00057 TGo4Thread::Sleep(fguWATCHINTERVAL);
00058 return 0;
00059 }
00060
00061