Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class THttpServer;
18
19class THttpEngine : public TNamed {
20protected:
21 friend class THttpServer;
22
23 THttpServer *fServer{nullptr}; ///<! 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
35public:
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 ClassDefOverride(THttpEngine, 0) // abstract class which should provide http-based protocol for server
43};
44
45#endif
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
Abstract class for implementing http protocol for THttpServer.
Definition THttpEngine.h:19
void SetServer(THttpServer *serv)
Definition THttpEngine.h:27
virtual Bool_t Create(const char *)
Method to create all components of engine.
Definition THttpEngine.h:37
virtual void Process()
Method regularly called in main ROOT context.
Definition THttpEngine.h:33
virtual void Terminate()
Method called when server want to be terminated.
Definition THttpEngine.h:30
THttpServer * GetServer() const
Returns pointer to THttpServer associated with engine.
Definition THttpEngine.h:40
THttpServer * fServer
! object server
Definition THttpEngine.h:23
Online http server for arbitrary ROOT application.
Definition THttpServer.h:31
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29