Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
THttpEngine.h
Go to the documentation of this file.
1 // $Id$
2 // Author: Sergey Linev 21/12/2013
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2013, 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_THttpEngine
13 #define ROOT_THttpEngine
14 
15 #include "TNamed.h"
16 
17 class THttpServer;
18 
19 class THttpEngine : public TNamed {
20 protected:
21  friend class THttpServer;
22 
23  THttpServer *fServer; ///<! object server
24 
25  THttpEngine(const char *name, const char *title);
26 
27  void SetServer(THttpServer *serv) { fServer = serv; }
28 
29  /** Method called when server want to be terminated */
30  virtual void Terminate() {}
31 
32  /** Method regularly called in main ROOT context */
33  virtual void Process() {}
34 
35 public:
36  /** Method to create all components of engine. Called once from by the server */
37  virtual Bool_t Create(const char *) { return kFALSE; }
38 
39  /** Returns pointer to THttpServer associated with engine */
40  THttpServer *GetServer() const { return fServer; }
41 
42  ClassDef(THttpEngine, 0) // abstract class which should provide http-based protocol for server
43 };
44 
45 #endif