Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
httpserverproxy.h
Go to the documentation of this file.
1
#pragma once
2
#ifndef HTTP_HTTPSERVERPROXY_H
3
#define HTTP_HTTPSERVERPROXY_H
4
//------------------------------------------------------------------------------
18
#include "
core/refcounted.h
"
19
#include "
core/singleton.h
"
20
#include "
http/httprequesthandler.h
"
21
22
//------------------------------------------------------------------------------
23
namespace
Http
24
{
25
class
HttpServerProxy
:
public
Core::RefCounted
26
{
27
__DeclareClass
(
HttpServerProxy
);
28
__DeclareSingleton
(
HttpServerProxy
);
29
public
:
31
HttpServerProxy
();
33
virtual
~HttpServerProxy
();
34
36
void
Open
();
38
void
Close
();
40
bool
IsOpen
()
const
;
41
43
void
AttachRequestHandler
(
const
Ptr<Http::HttpRequestHandler>
& h);
45
void
RemoveRequestHandler
(
const
Ptr<Http::HttpRequestHandler>
& h);
47
void
HandlePendingRequests
();
48
49
private
:
50
Util::Array<Ptr<HttpRequestHandler>
>
requestHandlers
;
51
bool
isOpen
;
52
};
53
54
//------------------------------------------------------------------------------
57
inline
bool
58
HttpServerProxy::IsOpen
()
const
59
{
60
return
this->
isOpen
;
61
}
62
63
}
// namespace Http
64
//------------------------------------------------------------------------------
65
#endif
66
Core::RefCounted
The common base class of Nebula.
Definition
refcounted.h:38
Http::HttpServerProxy::Open
void Open()
open the server proxy
Definition
httpserverproxy.cc:41
Http::HttpServerProxy::HttpServerProxy
HttpServerProxy()
constructor
Definition
httpserverproxy.cc:22
Http::HttpServerProxy::requestHandlers
Util::Array< Ptr< HttpRequestHandler > > requestHandlers
Definition
httpserverproxy.h:50
Http::HttpServerProxy::AttachRequestHandler
void AttachRequestHandler(const Ptr< Http::HttpRequestHandler > &h)
attach a request handler to the server
Definition
httpserverproxy.cc:68
Http::HttpServerProxy::HandlePendingRequests
void HandlePendingRequests()
handle pending http requests, call this method frequently
Definition
httpserverproxy.cc:112
Http::HttpServerProxy::__DeclareSingleton
__DeclareSingleton(HttpServerProxy)
Http::HttpServerProxy::__DeclareClass
__DeclareClass(HttpServerProxy)
Http::HttpServerProxy::Close
void Close()
close the server proxy
Definition
httpserverproxy.cc:52
Http::HttpServerProxy::IsOpen
bool IsOpen() const
return true if open
Definition
httpserverproxy.h:58
Http::HttpServerProxy::RemoveRequestHandler
void RemoveRequestHandler(const Ptr< Http::HttpRequestHandler > &h)
remove a request handler from the server
Definition
httpserverproxy.cc:88
Http::HttpServerProxy::~HttpServerProxy
virtual ~HttpServerProxy()
destructor
Definition
httpserverproxy.cc:31
Http::HttpServerProxy::isOpen
bool isOpen
Definition
httpserverproxy.h:51
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
httprequesthandler.h
Http
This file was generated with Nebula Trifid's idlc compiler tool.
Definition
defaulthttprequesthandler.cc:15
refcounted.h
singleton.h
code
foundation
http
httpserverproxy.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.