29 #ifndef Pt_Http_Service_h
30 #define Pt_Http_Service_h
32 #include <Pt/Http/Api.h>
33 #include <Pt/Http/Responder.h>
35 #include <Pt/Allocator.h>
36 #include <Pt/NonCopyable.h>
72 virtual void onReleaseResponder(
Responder*) = 0;
84 template <
typename R,
typename Alloc = Allocator>
101 void* r = _alloc.allocate(
sizeof(R) );
102 return new(r) R(*
this);
108 _alloc.deallocate( r,
sizeof(R) );
119 #endif // Pt_Http_Service_h
HTTP request message.
Definition: Request.h:43
Protects derived classes from being copied.
Definition: NonCopyable.h:54
virtual ~Responder()
Destructor.
HTTP service responder.
Definition: Responder.h:48
BasicService()
Default Constructor.
Definition: Service.h:90
HTTP service.
Definition: Service.h:46
virtual Responder * onGetResponder(const Request &)
Creates a responder to handle request received by a server.
Definition: Service.h:99
~BasicService()
Destructor.
Definition: Service.h:95
Basic HTTP service implementation.
Definition: Service.h:85
virtual void onReleaseResponder(Responder *r)
Destroys a responder created by a server.
Definition: Service.h:105