GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4ServerTask.cxx
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4ServerTask.h"
15 
16 #include "TMutex.h"
17 #include "TApplication.h"
18 #include "TSystem.h"
19 #include "TObjArray.h"
20 
21 #include "TGo4Log.h"
22 #include "TGo4LockGuard.h"
23 #include "TGo4Socket.h"
24 #include "TGo4BufferQueue.h"
25 #include "TGo4Thread.h"
26 #include "TGo4ThreadHandler.h"
27 #include "TGo4Status.h"
28 #include "TGo4CommandInvoker.h"
29 #include "TGo4TaskManager.h"
30 #include "TGo4TaskHandler.h"
31 #include "TGo4ConnectorRunnable.h"
32 #include "TGo4Slave.h"
33 #include "TGo4TaskConnectorTimer.h"
34 
35 
36 const Int_t TGo4ServerTask::fgiOPENWAITCYCLES=100; // wait cycles (100)
37 const UInt_t TGo4ServerTask::fguOPENWAITCYCLETIME=100; // time in ms (20)
38 const Int_t TGo4ServerTask::fgiCLOSEWAITCYCLES=100; // wait cycles (100)
39 const UInt_t TGo4ServerTask::fguCLOSEWAITCYCLETIME=100; // time in ms (20)
40 const Int_t TGo4ServerTask::fgiCONNECTWAITCYCLES=20; // wait cycles (20)
41 const UInt_t TGo4ServerTask::fguCONNECTWAITCYCLETIME=200; // time in ms (200)
42 const UInt_t TGo4ServerTask::fguCONNECTTIMERPERIOD=100; // time in ms (50)
43 
44 
45 const char *TGo4ServerTask::fgcLAUNCHPREFSFILE = "etc/Go4LaunchPrefs.txt";
46 
47 
49  UInt_t negotiationport,
50  Bool_t blockingmode,
51  Bool_t standalone,
52  Bool_t autostart,
53  Bool_t autocreate,
54  Bool_t ismaster)
55  : TGo4Task(name,blockingmode, autostart,autocreate,ismaster),
56  fxTaskManager(nullptr),fxCurrentTaskHandler(nullptr),
57  fxConnectTransport(nullptr), fxDisConnectTransport(nullptr),
58  fuConnectPort(0), fbKeepServerSocket(kFALSE),
59  fbConnectRequest(kFALSE), fbDisConnectRequest(kFALSE),
60  fbConnectIsOpen(kFALSE),fbConnectIsDone(kFALSE), fbConnectIsClose(kFALSE),
61  fxConnectorTimer(nullptr)
62 {
63  TString nomen("TaskManager of "); nomen += name;
64  fxTaskManager= new TGo4TaskManager(nomen.Data(), this, negotiationport);
65 
66  if(negotiationport!=42)
67  {
68  // connector runnable:
69  nomen.Form("ConnectorRunnable of %s", name);
70  TGo4ConnectorRunnable* conny = new TGo4ConnectorRunnable(nomen.Data(),this);
71  nomen.Form("CONNECTOR-%s", name);
72  fxConnectorName=nomen;
74  }
75  else {} // do not start connector port in local mode <- nameservice problems without wan!
76 
77  TGo4CommandInvoker::Instance(); // make sure a command invoker exists
78  TGo4CommandInvoker::Register("ServerTask", this);
80  fxConnectorTimer->TurnOn();
81  if(standalone)
82  {
83  Launch(); // create threads, start application control timer
84  }
85  else
86  {
87  // subclass must call Launch at end of its ctor
88  }
89 }
90 
91 
93 {
95  delete fxConnectorTimer;
96  delete fxTaskManager;
98 }
99 
100 Bool_t TGo4ServerTask::RemoveClient(const char *name, Bool_t clientwait, Bool_t isterminating)
101 {
102  Bool_t rev=kTRUE;
103  TGo4TaskHandler *taskhandler = nullptr;
104  if(name && strstr(name,"current"))
105  taskhandler=GetCurrentTaskHandler();
106  else
107  taskhandler=GetTaskHandler(name);
108  if(!taskhandler)
109  {
110  // no such taskhandler for name
111  TGo4Log::Debug(" ServerTask -- RemoveClient FAILED, no client %s !!! ",
112  name);
113  rev=kFALSE;
114  }
115  else
116  {
117  TGo4Log::Debug(" ServerTask -- removing client task %s ",name);
118  // first stop all user threads waiting on or writing into the data queues
119  StopWorkThreads();
120  if(clientwait)
121  {
122  // normal mode: handshake with client to be removed
123 
124 
125  // send quit command to client, client will send dummy objects back
126  // to release waiting sockets
127  // then client will request a disconnect action from the connector runnable
128  if(IsMaster())
129  SubmitEmergencyCommand(kComQuit); // master quits client when removing
130  else
131  SubmitEmergencyData(kComQuit, taskhandler->GetName()); // client data runnable must handle quit request of server!
132  TGo4Log::Debug(" Server Task -- Waiting for client %s disconnection...",taskhandler->GetName());
133  Int_t removeresult=fxTaskManager->WaitForClientRemoved();
134  // disconnection is done by connector
135  // thread using task manager methods
136  switch(removeresult)
137  {
138  case -1:
139  // timeout
140  TGo4Log::Debug(" !!! Server Task -- client remove wait TIMEOUT !!! ");
141  rev=fxTaskManager->DisConnectClient(taskhandler->GetName(),kFALSE); // do not wait for client ok
142  break;
143 
144  case -2:
145  // we are terminating the server
146  TGo4Log::Debug(" !!! Server Task -- client remove aborted for TERMINATION MODE !!! ");
147  rev=kFALSE;
148  break;
149 
150  default:
151  // all right
152  TGo4Log::Debug(" Server Task -- waited %d cycles until client was removed. ",removeresult);
153  rev=kTRUE;
154  break;
155 
156  }
157  } // if(clientwait)
158  else
159  {
160  // no communication with client, just disconnect without waiting
161  TGo4Log::Debug(" !!! Server Task -- removing client %s without waiting... ",
162  taskhandler->GetName());
163  SendStopBuffers(taskhandler->GetName());
164  rev= (fxTaskManager->DisConnectClient(taskhandler->GetName(),kFALSE) == 0); // do not wait
165  }
166  if(!isterminating) StartWorkThreads();
167  }
168  return rev;
169 }
170 
172 {
173  Int_t rev = 0; // return value is number of removed clients
175  TObjArray names;
176  Bool_t reset = kTRUE;
177  while (auto taskhandler = fxTaskManager->NextTaskHandler(reset)) {
178  reset = kFALSE;
179  names.AddLast(new TNamed(taskhandler->GetName(), "title"));
180  }
181  TIter niter(&names);
182  while (auto nomen = niter()) {
183  RemoveClient(nomen->GetName(), !force, kTRUE);
184  rev++;
185  }
186  names.Delete();
187  // end iteration
188  return rev;
189 }
190 
191 
193 {
194  Bool_t rev=kTRUE;
195  TGo4TaskHandler *taskhandler=GetCurrentTaskHandler();
196  if (taskhandler) {
197  // we have a current client, remove it
198  TGo4Log::Debug(" Server task -- removing current client %s ", taskhandler->GetName());
199  rev = RemoveClient(taskhandler->GetName());
200  } else {
201  rev = kFALSE;
202  }
203  return rev;
204 }
205 
206 void TGo4ServerTask::SetCurrentTask(const char *name)
207 {
208  TGo4TaskHandler *han = nullptr;
209  if (!fxTaskManager) {
210  TGo4Log::Debug(" TGo4ServerTask ''%s'' ERROR- task manager not existing!!! ", GetName());
211  } else {
212  // first stop all user threads waiting on or writing into the data queues
213  if (IsWorkStopped()) {
214  // Working threads have already been stopped
215  // maybe by RemoveClient method.
216  // We do nothing, since the current taskhandler is not
217  // reset yet and any access to current task in the derived
218  // _user_ method would crash the program!
219  } else // if(IsWorkStopped())
220  {
221  // work has not been stopped, we do that
222  StopWorkThreads();
223  } // else if(fbWorkIsStopped)
224  {
225  if (!name) {
226  // zero name given, set pointer to last handler still in list
228  } else {
229  // name specified, search for it
230  han = fxTaskManager->GetTaskHandler(name);
231  if (han) {
232  fxCurrentTaskHandler = han;
233  } else {
234  TGo4Log::Debug(" ServerTask: FAILED setting current task to %s-- no such client! ", name);
235  }
236  }
237  }
238 
239  // finally, start user threads again
241  }
242 }
243 
245 {
246  return fxTaskManager->GetTaskHandler(name);
247 }
248 
250 {
251  return GetCurrentTaskHandler();
252 }
253 
255 {
256  return fxCurrentTaskHandler;
257 }
258 
260 {
261  return fxTaskManager;
262 }
263 
264 void TGo4ServerTask::SetConnect(TGo4Socket *trans, const char *host, UInt_t port, Bool_t keepserv)
265 {
266  fxConnectTransport=trans;
267  fxConnectHost=host;
268  fuConnectPort=port;
269  fbConnectRequest=kTRUE;
270  fbKeepServerSocket=keepserv;
271 }
272 
274 {
275  fxDisConnectTransport = trans;
276  fbDisConnectRequest = kTRUE;
277 }
278 
280 {
281  Int_t rev = 0;
285  {
286  if (fxDisConnectTransport) {
287  // we have a transport instance to disconnect
289  // delete fxDisConnectTransport; // new
290  fbConnectIsClose = kTRUE;
291  fbDisConnectRequest = kFALSE; // we served the request, reset it
292  rev += 1;
293  } else {
294  // error, zero pointer given
295  rev += 32;
296  }
297  } else
298  {
299  // no open request, continue
300  rev += 2;
301  }
302 
305  if(fbConnectRequest)
306  {
307  // timer shall open a transport as server
309  {
310 
311  if(!fxConnectTransport->IsOpen())
312  {
313  // transport is not open, so do it
314 // std::cout << "++++++++Timer will open transport"<< std::endl;
315  fbConnectIsOpen=kTRUE; // tell connector thread that we try to open
317  if(result == 0)
318  {
319  fbConnectIsDone=kTRUE; // tell connector thread we returned from open
320  fbConnectRequest=kFALSE; // we served the request, reset it
321  fbKeepServerSocket=kFALSE; // reset keep server socket flag
322  rev+=4;
323  }
324  else
325  {
326  rev=-4;
327  // open was not finished, we poll once again...
328  }
329  }
330  else
331  {
332  // transport was already open
333 // std::cout <<"OOOOOOOOOOOO TimerConnect transport already open!" << std::endl;
334  fbConnectIsOpen=kTRUE;
335  fbConnectIsDone=kTRUE; // tell connector thread we returned from open
336  fbConnectRequest=kFALSE; // we served the request, reset it
337  fbKeepServerSocket=kFALSE; // reset keep server socket flag
338  rev+=8;
339  }
340  }
341  else
342  {
343  rev+=64;
344  // no Transport specified: create raw server for negotiation port
345  //fxConnectTransport=new TGo4Socket("Server",3);
346  }
347  }
348  else
349  {
350  // no open request, continue
351  rev+=16;
352  }
353  return rev;
354 }
355 
357 {
358  Int_t count = 0;
359  while(!fbConnectIsOpen)
360  {
362  {
363  count = -1; // timeout
364  break;
365  }
366  else
367  {
369  ++count;
370  }
371 // std::cout << "*****WaitForOpen()"<< std::endl;
372  }
373  fbConnectIsOpen=kFALSE; // reset for next time
374  return count;
375 }
376 
377 
379 {
380  Int_t count = 0;
381  while(!fbConnectIsClose)
382  {
384  {
385  count = -1; // timeout
386  break;
387  }
388  else
389  {
391  ++count;
392  }
393  }
394  fbConnectIsClose=kFALSE; // reset for next time
395  return count;
396 }
397 
399 {
400  Int_t count = 0;
401  while(!fbConnectIsDone)
402  {
403  if(IsTerminating())
404  {
405  count = -2; // termination mode
406  break;
407  }
408 // timeout would affect the permanent connector port Open, we skip this
409 // else if(count>TGo4ServerTask::fgiCONNECTWAITCYCLES)
410 // {
411 // count = -1; // timeout
412 // break;
413 // }
414  else
415  {
417  ++count;
418  }
419 // std::cout << "*****WaitForConnection()"<< std::endl;
420  }
421  fbConnectIsDone=kFALSE; // reset for next time
422  return count;
423 }
424 
426 {
427  return fxConnectTransport;
428 }
429 
431 {
432  TGo4BufferQueue *queue = nullptr;
433  TGo4TaskHandler *currenttask = nullptr;
434  if(!name || strstr(name,"current"))
435  currenttask=GetCurrentTaskHandler(); // find out the current client
436  else
437  currenttask=GetTaskHandler(name); // find out destination client by name
438  if(currenttask)
439  queue=dynamic_cast<TGo4BufferQueue*> (currenttask->GetCommandQueue());
440  return queue;
441 }
442 
444 {
445  TGo4BufferQueue *queue = nullptr;
446  TGo4TaskHandler *currenttask = nullptr;
447  if(!name)
448  currenttask=GetCurrentTaskHandler(); // find out the current client
449  else
450  currenttask=GetTaskHandler(name); // find out destination client by name
451  if(currenttask)
452  queue=dynamic_cast<TGo4BufferQueue*> (currenttask->GetStatusQueue());
453  return queue;
454 }
455 
457 {
458  TGo4BufferQueue *queue = nullptr;
459  TGo4TaskHandler *currenttask = nullptr;
460  if(!name || strstr(name,"current"))
461  currenttask=GetCurrentTaskHandler(); // find out the current client
462  else
463  currenttask=GetTaskHandler(name); // find out destination client by name
464  if(currenttask)
465  queue=dynamic_cast<TGo4BufferQueue*> (currenttask->GetDataQueue());
466  return queue;
467 }
468 
470 {
471  if (IsMaster())
472  return nullptr;
473  TGo4Command *com = nullptr;
474  Bool_t reset = kTRUE;
475  TGo4LockGuard taskmutex(fxTaskManager->GetMutex());
476  while (auto han = fxTaskManager->NextTaskHandler(reset)) {
477  reset = kFALSE;
478  TGo4BufferQueue *comq = dynamic_cast<TGo4BufferQueue *>(han->GetCommandQueue());
479  if (!comq)
480  continue; // NEVER COME HERE!
481  if (!comq->IsEmpty()) { // prevent waiting on queue
482  com = dynamic_cast<TGo4Command *>(comq->WaitObjectFromBuffer());
483  if (com) {
484  com->SetTaskName(han->GetName());
485  com->SetMode(han->GetRole());
486  return com;
487  }
488  }
489  } // while
490  return com;
491 }
492 
493 void TGo4ServerTask::SendStatus(TGo4Status *stat, const char *receiver)
494 {
495  if(IsMaster()) return;
496  if(!stat) return;
497  if(receiver) {
498  TGo4Task::SendStatus(stat,receiver);
499  return;
500  }
501  // send status to all
502  TGo4LockGuard taskmutex(fxTaskManager->GetMutex());
503  Bool_t reset = kTRUE;
504  while(auto han = fxTaskManager->NextTaskHandler(reset)) {
505  reset = kFALSE;
506  auto statq = dynamic_cast<TGo4BufferQueue *>(han->GetStatusQueue());
507  if(!statq) continue; //NEVER COME HERE!
508  TGo4Log::Debug(" Task - sending status %s to task %s", stat->ClassName(), han->GetName());
509  statq->AddBufferFromObject(stat);
510  }
511 }
512 
514 {
515  if(IsMaster()) return;
516  TGo4LockGuard statguard(fxStatusMutex); // do not send during buffer update
517  TGo4LockGuard taskmutex(fxTaskManager->GetMutex()); // protect task list
518  Bool_t reset=kTRUE;
519  while(auto han = fxTaskManager->NextTaskHandler(reset)) {
520  reset=kFALSE;
521  TGo4BufferQueue * statq=dynamic_cast<TGo4BufferQueue*> (han->GetStatusQueue());
522  if(!statq) continue; //NEVER COME HERE!
523  TGo4Log::Debug(" Task - sending status buffer to task %s", han->GetName());
524  statq->AddBuffer(fxStatusBuffer,kTRUE);
525  }
526 }
527 
529 {
530  return GetWorkHandler()->Start( GetConnectorName() );
531 }
532 
534 {
535  Bool_t rev = GetWorkHandler()->Stop( GetConnectorName() ); // unset running flag
536  // now establish a dummy connection to our own server to release the listen socket:
537  const char *host = gSystem->HostName();
538  Int_t negotiationport = fxTaskManager->GetNegotiationPort();
539  TGo4Socket *connector = new TGo4Socket(kTRUE); // raw socket transport
540  connector->Open(host,negotiationport); // open connection to server's connector runnable
541  connector->Send(TGo4TaskHandler::Get_fgcERROR()); // force server to stop
542  connector->Close();
543  delete connector;
544  return rev;
545 }
546 
547 
549 {
551  return conny->IsWaiting();
552 }
553 
555 {
556  TGo4Log::Debug(" ServerTask Quit -- removing all connected clients ");
557  SendStatusMessage(2,kTRUE,"ServerTask %s is shutting down now! All clients are removed...",GetName());
558  TGo4Slave* slave = GetSlave();
559  if(slave) {
560  TGo4Log::Debug(" ServerTask Quit is stopping slave...");
561  slave->Stop(); // to execute analysis postloop if still running
562  }
563  if(!IsMaster()) {
564  fxTaskManager->GetMutex()->UnLock(); // JAM avoid deadlocking of analysis server main thread with connector thread that actually performs the remove
565  }
567  //StopWorkThreads(); // are re-started after last client is removed...
568  WakeCommandQueue(TGo4Task::Get_fgiTERMID()); // will stop local command thread, and remote
569  Terminate(!IsMaster()); // terminate only slave server here!
570 // if(!IsMaster())
571 // fxTaskManager->GetMutex()->Lock(); // avoid conflicts with lockguard outside
572 }
573 
574 
576 {
577  TGo4Log::Debug(" ServerTask Shutdown without disconnect waiting");
578  SendStatusMessage(2,kTRUE,"ServerTask %s is shutting down now! All clients are removed...",GetName());
579  fxTaskManager->GetMutex()->UnLock(); // avoid possible deadlock between main thread and connector thread
580  TGo4Thread::Sleep(10*fguCONNECTTIMERPERIOD); // wait 1 s to broadcast shutdown message before terminating...
581  StopWorkThreads();
582  WakeCommandQueue(TGo4Task::Get_fgiTERMID()); // will stop local command thread, and remote
583 
584  RemoveAllClients(true);
585 
586  TGo4Slave* slave=GetSlave();
587  if (slave) {
588  TGo4Log::Debug(" ServerTask Shutdown stopping slave...");
589  slave->Stop(); // to execute analysis postloop.
590  // We are within main thread here, i.e. it never stops before termination!
591  slave->SetTask(nullptr, kFALSE); // otherwise owner dtor will delete us...
592  delete slave; // call dtors of analysis framework
593  // SetOwner(0);
594  }
595  fxTaskManager->GetMutex()->Lock();
596  gApplication->Terminate(); // do not wait until appctrl timer terminates us
597 }
598 
600 {
601  return fgcLAUNCHPREFSFILE;
602 }
virtual Bool_t RemoveClient(const char *name, Bool_t clientwait=kTRUE, Bool_t isterminating=kFALSE)
TString fxConnectorName
TGo4Thread * GetThread(const char *name)
Bool_t fbDisConnectRequest
virtual Int_t StartWorkThreads()
Definition: TGo4Task.cxx:548
virtual Int_t Close(Option_t *opt="")
Definition: TGo4Socket.cxx:210
Bool_t IsOpen() const
Definition: TGo4Socket.h:37
Bool_t IsEmpty() const
Definition: TGo4Queue.cxx:80
TObject * WaitObjectFromBuffer()
TGo4TaskHandler * NextTaskHandler(Bool_t reset=kFALSE)
void WakeCommandQueue(Int_t id=0)
Definition: TGo4Task.cxx:522
void SendStatusBuffer() override
static const UInt_t fguCONNECTWAITCYCLETIME
virtual Int_t Send(TObject *obj)
Definition: TGo4Socket.cxx:332
Int_t WaitForConnection()
Bool_t IsWorkStopped() const
Definition: TGo4Task.h:246
static void UnRegister(TGo4CommandReceiver *p)
UInt_t GetNegotiationPort()
TGo4ThreadHandler * fxWorkHandler
void SetTaskName(const char *)
Bool_t RemoveCurrentClient()
Bool_t SubmitEmergencyData(Go4EmergencyCommand_t val, const char *receiver=nullptr)
Definition: TGo4Task.cxx:455
void SetDisConnect(TGo4Socket *trans)
TGo4TaskHandler * GetTaskHandler() override
void SendStopBuffers(const char *taskname=nullptr)
Definition: TGo4Task.cxx:560
static const char * Get_fgcERROR()
TGo4TaskConnectorTimer * fxConnectorTimer
static void Sleep(UInt_t millisecs)
Definition: TGo4Thread.cxx:295
void Terminate(Bool_t termapp=kTRUE) override
Definition: TGo4Task.cxx:130
Bool_t fbConnectIsOpen
static void Register(const char *name, TGo4CommandReceiver *p)
virtual Int_t Open(const char *host, Int_t port, Bool_t keepservsock=kFALSE)
Definition: TGo4Socket.cxx:92
Bool_t NewThread(const char *name, TGo4Runnable *runnable)
TGo4BufferQueue * GetCommandQueue(const char *task=nullptr) override
virtual Int_t StopWorkThreads()
Definition: TGo4Task.cxx:554
void Quit() override
void SetConnect(TGo4Socket *trans, const char *host, UInt_t port, Bool_t keepserv=kFALSE)
TGo4TaskHandler * fxCurrentTaskHandler
Bool_t fbConnectIsDone
virtual Bool_t StopConnectorThread()
static const UInt_t fguCONNECTTIMERPERIOD
virtual void Stop()
Definition: TGo4Slave.cxx:70
TGo4Socket * fxDisConnectTransport
virtual void SendStatus(TGo4Status *stat, const char *receiver=nullptr)
Definition: TGo4Task.cxx:246
static const UInt_t fguCLOSEWAITCYCLETIME
virtual Int_t TimerConnect()
static void Debug(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:281
TGo4Command * NextCommand() override
void SendStatus(TGo4Status *stat, const char *receiver=nullptr) override
static const char * Get_fgcLAUNCHPREFSFILE()
Int_t DisConnectClient(const char *name, Bool_t clientwait=kTRUE)
Bool_t IsWaiting() const
Definition: TGo4Thread.h:88
static TGo4CommandInvoker * Instance()
static const Int_t fgiCONNECTWAITCYCLES
TGo4TaskHandler * GetTaskHandler(const char *name)
TString fxConnectHost
static const UInt_t fguOPENWAITCYCLETIME
TMutex * fxStatusMutex
Definition: TGo4Task.h:299
Bool_t SubmitEmergencyCommand(Go4EmergencyCommand_t val)
Definition: TGo4Task.cxx:433
static const Int_t fgiOPENWAITCYCLES
TMutex * GetMutex()
void AddBuffer(TBuffer *buffer, Bool_t clone=kFALSE)
Bool_t Stop(const char *thname)
const char * GetConnectHost() const
TGo4Slave * GetSlave() const
Definition: TGo4Task.h:259
TGo4Queue * GetStatusQueue() const
Bool_t ConnectorThreadIsStopped()
Bool_t Start(const char *thname)
TBuffer * fxStatusBuffer
Definition: TGo4Task.h:302
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
Definition: TGo4Task.cxx:272
TGo4BufferQueue * GetDataQueue(const char *task=nullptr) override
Bool_t fbKeepServerSocket
TGo4ServerTask(const char *name, UInt_t negotiationport=0, Bool_t blockingmode=kFALSE, Bool_t standalone=kFALSE, Bool_t autostart=kTRUE, Bool_t autocreate=kTRUE, Bool_t ismaster=kTRUE)
TGo4ThreadHandler * GetWorkHandler() const
TGo4Socket * GetConnectTransport()
TGo4Queue * GetCommandQueue() const
Bool_t fbConnectRequest
TGo4TaskManager * fxTaskManager
virtual Int_t RemoveAllClients(Bool_t force=false)
void SetTask(TGo4Task *task, Bool_t delold=kTRUE)
Bool_t IsMaster() const
Definition: TGo4Task.h:93
static const Int_t fgiCLOSEWAITCYCLES
TGo4TaskHandler * GetLastTaskHandler()
virtual ~TGo4ServerTask()
Bool_t fbConnectIsClose
Bool_t IsTerminating() const
static Int_t Get_fgiTERMID()
Definition: TGo4Task.cxx:588
TGo4Queue * GetDataQueue() const
void SetMode(Go4CommandMode_t m)
Definition: TGo4Command.h:83
TGo4TaskHandler * GetCurrentTaskHandler()
Int_t WaitForClientRemoved()
void SetCurrentTask(const char *name)
static const char * fgcLAUNCHPREFSFILE
TGo4TaskManager * GetTaskManager()
TGo4Socket * fxConnectTransport
TGo4BufferQueue * GetStatusQueue(const char *task=nullptr) override
virtual Bool_t StartConnectorThread()
const char * GetConnectorName() const