// @(#)root/proofx:$Id$
// Author: G. Ganis Oct 2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TXProofServ
#define ROOT_TXProofServ

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TXProofServ                                                          //
//                                                                      //
// TXProofServ is the XRD version of the PROOF server. It differs from  //
// TProofServ only for the underlying connection technology             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TProofServ
#include "TProofServ.h"
#endif
#ifndef ROOT_TXHandler
#include "TXHandler.h"
#endif

class TXProofServInterruptHandler;
class TXSocketHandler;

class TXProofServ : public TProofServ, public TXHandler {

private:
   TXProofServInterruptHandler *fInterruptHandler;
   TXSocketHandler             *fInputHandler;
   TString                      fSockPath;

   Bool_t        fTerminated; //true if Terminate() has been already called

   Int_t         LockSession(const char *sessiontag, TProofLockPath **lck);

   Int_t         Setup();

public:
   TXProofServ(Int_t *argc, char **argv, FILE *flog = 0);
   virtual ~TXProofServ();

   Int_t         CreateServer();

   // Disable / Enable read timeout
   void          DisableTimeout();
   void          EnableTimeout();

   EQueryAction  GetWorkers(TList *workers, Int_t &prioritychange,
                            Bool_t resume = kFALSE);

   Bool_t        HandleError(const void *in = 0); // Error Handler
   Bool_t        HandleInput(const void *in = 0); // Input handler

   void          HandleUrgentData();
   void          HandleSigPipe();
   void          HandleTermination();

   void          ReleaseWorker(const char *ord);
   void          Terminate(Int_t status);

   ClassDef(TXProofServ,0)  //XRD PROOF Server Application Interface
};

#endif
 TXProofServ.h:1
 TXProofServ.h:2
 TXProofServ.h:3
 TXProofServ.h:4
 TXProofServ.h:5
 TXProofServ.h:6
 TXProofServ.h:7
 TXProofServ.h:8
 TXProofServ.h:9
 TXProofServ.h:10
 TXProofServ.h:11
 TXProofServ.h:12
 TXProofServ.h:13
 TXProofServ.h:14
 TXProofServ.h:15
 TXProofServ.h:16
 TXProofServ.h:17
 TXProofServ.h:18
 TXProofServ.h:19
 TXProofServ.h:20
 TXProofServ.h:21
 TXProofServ.h:22
 TXProofServ.h:23
 TXProofServ.h:24
 TXProofServ.h:25
 TXProofServ.h:26
 TXProofServ.h:27
 TXProofServ.h:28
 TXProofServ.h:29
 TXProofServ.h:30
 TXProofServ.h:31
 TXProofServ.h:32
 TXProofServ.h:33
 TXProofServ.h:34
 TXProofServ.h:35
 TXProofServ.h:36
 TXProofServ.h:37
 TXProofServ.h:38
 TXProofServ.h:39
 TXProofServ.h:40
 TXProofServ.h:41
 TXProofServ.h:42
 TXProofServ.h:43
 TXProofServ.h:44
 TXProofServ.h:45
 TXProofServ.h:46
 TXProofServ.h:47
 TXProofServ.h:48
 TXProofServ.h:49
 TXProofServ.h:50
 TXProofServ.h:51
 TXProofServ.h:52
 TXProofServ.h:53
 TXProofServ.h:54
 TXProofServ.h:55
 TXProofServ.h:56
 TXProofServ.h:57
 TXProofServ.h:58
 TXProofServ.h:59
 TXProofServ.h:60
 TXProofServ.h:61
 TXProofServ.h:62
 TXProofServ.h:63
 TXProofServ.h:64
 TXProofServ.h:65
 TXProofServ.h:66
 TXProofServ.h:67
 TXProofServ.h:68
 TXProofServ.h:69
 TXProofServ.h:70
 TXProofServ.h:71
 TXProofServ.h:72
 TXProofServ.h:73