00001 // @(#)root/proofx:$Id: TXProofServ.h 29233 2009-06-26 08:07:47Z brun $ 00002 // Author: G. Ganis Oct 2005 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TXProofServ 00013 #define ROOT_TXProofServ 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TXProofServ // 00018 // // 00019 // TXProofServ is the XRD version of the PROOF server. It differs from // 00020 // TProofServ only for the underlying connection technology // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TProofServ 00025 #include "TProofServ.h" 00026 #endif 00027 #ifndef ROOT_TXHandler 00028 #include "TXHandler.h" 00029 #endif 00030 00031 class TXProofServInterruptHandler; 00032 class TXSocketHandler; 00033 00034 class TXProofServ : public TProofServ, public TXHandler { 00035 00036 private: 00037 TXProofServInterruptHandler *fInterruptHandler; 00038 TXSocketHandler *fInputHandler; 00039 TString fSockPath; 00040 00041 Bool_t fTerminated; //true if Terminate() has been already called 00042 00043 Int_t LockSession(const char *sessiontag, TProofLockPath **lck); 00044 00045 Int_t Setup(); 00046 00047 public: 00048 TXProofServ(Int_t *argc, char **argv, FILE *flog = 0); 00049 virtual ~TXProofServ(); 00050 00051 Int_t CreateServer(); 00052 00053 // Disable / Enable read timeout 00054 void DisableTimeout(); 00055 void EnableTimeout(); 00056 00057 EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, 00058 Bool_t resume = kFALSE); 00059 00060 Bool_t HandleError(const void *in = 0); // Error Handler 00061 Bool_t HandleInput(const void *in = 0); // Input handler 00062 00063 void HandleUrgentData(); 00064 void HandleSigPipe(); 00065 void HandleTermination(); 00066 00067 void ReleaseWorker(const char *ord); 00068 void Terminate(Int_t status); 00069 00070 ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface 00071 }; 00072 00073 #endif