ROOT » NET » HTTP » THttpServer

class THttpServer: public TNamed


THttpCallArg

Contains arguments for single HTTP call
Must be used in THttpEngine to process icomming http requests


Function Members (Methods)

public:
virtual~THttpServer()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
Bool_tCreateEngine(const char* engine)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_tExecuteHttp(THttpCallArg* arg)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
static const char*GetMimeType(const char* path)
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TRootSniffer*GetSniffer() const
virtual const char*TNamed::GetTitle() const
const char*GetTopName() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tIsFileRequested(const char* uri, TString& res) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
THttpServer&operator=(const THttpServer&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
voidProcessRequests()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
Bool_tRegister(const char* subfolder, TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetSniffer(TRootSniffer* sniff)
voidSetTimer(Long_t milliSec = 100, Bool_t mode = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetTopName(const char* top)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
THttpServer(const char* engine = "civetweb:8080")
THttpServer(const THttpServer&)
Bool_tUnregister(TObject* obj)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
voidProcessRequest(THttpCallArg* arg)

Data Members

public:
static TObject::<anonymous>TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::<anonymous>TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::<anonymous>TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::<anonymous>TObject::kOverwrite
static TObject::<anonymous>TObject::kSingleKey
static TObject::<anonymous>TObject::kWriteDelete
static TObject::<anonymous>TObject::kZombie
protected:
TListfCallArgs! submitted arguments
TStringfDefaultPage! file name for default page name
TStringfDrawPage! file name for drawing of single element
TListfEngines! engines which runs http server
TStringfHttpSys! location of http plugin, need to read special files
TStringfJSRootIOSys! location of JSRootIO (if any)
Long_tfMainThrdId! id of the main ROOT process
TMutexfMutex! mutex to protect list with arguments
TStringTNamed::fNameobject identifier
TStringfRootSys! location of ROOT (if any)
TRootSniffer*fSniffer! sniffer provides access to ROOT objects hierarchy
THttpTimer*fTimer! timer used to access main thread
TStringTNamed::fTitleobject title
TStringfTopName! name of top folder, default - "ROOT"

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THttpServer(const char* engine = "civetweb:8080")
 constructor
~THttpServer()
 destructor
 delete all http engines and sniffer
void SetSniffer(TRootSniffer* sniff)
Bool_t CreateEngine(const char* engine)
 factory method to create different http engine
 At the moment two engine kinds are supported:
  civetweb (default) and fastcgi
 Examples:
   "civetweb:8090" or "http:8090" or ":8090" - creates civetweb web server with http port 8090
   "fastcgi:9000" - creates fastcgi server with port 9000
   "dabc:1237"   - create DABC server with port 1237 (only available with DABC installed)
   "dabc:master_host:port" - attach to DABC master, running on master_host:port, (only available with DABC installed)
void SetTimer(Long_t milliSec = 100, Bool_t mode = kTRUE)
 create timer which will invoke ProcessRequests() function periodically
 Timer is required to perform all actions in main ROOT thread
 Method arguments are the same as for TTimer constructor
 By default, sync timer with 100 ms period is created

 If milliSec == 0, no timer will be created.
 In this case application should regularly call ProcessRequests() method.
Bool_t IsFileRequested(const char* uri, TString& res) const
 verifies that request just file name
 File names typically contains prefix like "httpsys/" or "jsrootiosys/"
 If true, method returns real name of the file,
 which should be delivered to the client
 Method is thread safe and can be called from any thread
Bool_t ExecuteHttp(THttpCallArg* arg)
 Executes http request, specified in THttpCallArg structure
 Method can be called from any thread
 Actual execution will be done in main ROOT thread, where analysis code is running.
void ProcessRequests()
 Process requests, submitted for execution
 Regularly invoked by THttpTimer, when somewhere in the code
 gSystem->ProcessEvents() is called.
 User can call serv->ProcessRequests() directly, but only from main analysis thread.
void ProcessRequest(THttpCallArg* arg)
 Process single http request
 Depending from requested path and filename different actions will be performed.
 In most cases information is provided by TRootSniffer class
Bool_t Register(const char* subfolder, TObject* obj)
 Register object in folders hierarchy

 See TRootSniffer::RegisterObject() for more details
Bool_t Unregister(TObject* obj)
 Unregister object in folders hierarchy

 See TRootSniffer::UnregisterObject() for more details
const char * GetMimeType(const char* path)
void SetTopName(const char* top)
 these methods used to set http request arguments
const char * GetTopName() const
THttpServer(const char* engine = "civetweb:8080")
TRootSniffer * GetSniffer() const