Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TXProofServ.h
Go to the documentation of this file.
1 // @(#)root/proofx:$Id$
2 // Author: G. Ganis Oct 2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TXProofServ
13 #define ROOT_TXProofServ
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TXProofServ //
18 // //
19 // TXProofServ is the XRD version of the PROOF server. It differs from //
20 // TProofServ only for the underlying connection technology //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TProofServ.h"
25 #include "TXHandler.h"
26 
27 class TXProofServInterruptHandler;
28 class TXSocketHandler;
29 
30 class TXProofServ : public TProofServ, public TXHandler {
31 
32 private:
33  TXProofServInterruptHandler *fInterruptHandler;
34  TXSocketHandler *fInputHandler;
35  TString fSockPath;
36 
37  Bool_t fTerminated; //true if Terminate() has been already called
38 
39  Int_t LockSession(const char *sessiontag, TProofLockPath **lck);
40 
41  Int_t Setup();
42 
43 public:
44  TXProofServ(Int_t *argc, char **argv, FILE *flog = 0);
45  virtual ~TXProofServ();
46 
47  Int_t CreateServer();
48 
49  // Disable / Enable read timeout
50  void DisableTimeout();
51  void EnableTimeout();
52 
53  EQueryAction GetWorkers(TList *workers, Int_t &prioritychange,
54  Bool_t resume = kFALSE);
55 
56  Bool_t HandleError(const void *in = 0); // Error Handler
57  Bool_t HandleInput(const void *in = 0); // Input handler
58 
59  void HandleUrgentData();
60  void HandleSigPipe();
61  void HandleTermination();
62 
63  void ReleaseWorker(const char *ord);
64  void Terminate(Int_t status);
65 
66  ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface
67 };
68 
69 #endif