2#ifndef HTTP_HTTPREQUESTHANDLER_H
3#define HTTP_HTTPREQUESTHANDLER_H
The common base class of Nebula.
Definition refcounted.h:38
HttpRequestHandlers are attached to the HttpServer and process incoming HTTP requests.
Definition httprequesthandler.h:31
void HandlePendingRequests()
handle all pending requests, called by local-thread's HttpServerProxy
Definition httprequesthandler.cc:51
void SetDesc(const Util::String &d)
set human readable description
Definition httprequesthandler.h:92
const Util::String & GetRootLocation() const
get a resource location path which is accepted by the handler (e.g. "/display")
Definition httprequesthandler.h:119
Util::String desc
Definition httprequesthandler.h:64
Util::Array< Ptr< HttpRequest > > curWorkRequests
Definition httprequesthandler.h:67
void SetRootLocation(const Util::String &l)
set the root location of the request handler
Definition httprequesthandler.h:110
virtual ~HttpRequestHandler()
destructor
Definition httprequesthandler.cc:27
const Util::String & GetDesc() const
get a human readable description of the request handler
Definition httprequesthandler.h:101
Threading::SafeQueue< Ptr< HttpRequest > > pendingRequests
Definition httprequesthandler.h:66
virtual void HandleRequest(const Ptr< HttpRequest > &request)
handle a http request, overwrite this method in you subclass
Definition httprequesthandler.cc:73
void SetName(const Util::String &n)
set human readable name of the request handler
Definition httprequesthandler.h:74
void PutRequest(const Ptr< HttpRequest > &httpRequest)
put a request to the pending queue, called by HttpServer thread
Definition httprequesthandler.cc:39
HttpRequestHandler()
constructor
Definition httprequesthandler.cc:19
Util::String rootLocation
Definition httprequesthandler.h:65
const Util::String & GetName() const
get a human readable name of the request handler
Definition httprequesthandler.h:83
Util::String name
Definition httprequesthandler.h:63
__DeclareClass(HttpRequestHandler)
Implements an extremly simple standalone HTTP server with attached HttpRequestHandlers.
Definition httpserver.h:29
Client-side proxy of the HttpServer.
Definition httpserverproxy.h:26
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Thread-safe version of Util::Queue.
Definition safequeue.h:27
Nebula's dynamic array class.
Definition array.h:60
This file was generated with Nebula Trifid's idlc compiler tool.
Definition defaulthttprequesthandler.cc:15
Nebula's universal string class.
Definition string.h:50