![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <http_monitor.h>
Public Member Functions | |
HttpMonitorHandler (const std::string &name, Arg arg) | |
virtual void | handleHttpPayload (const HttpHeader &header, const std::string &payload) |
virtual void | doGet (const std::string &resource) |
virtual void | doPost (const std::string &resource, const std::string &payload) |
virtual void | doDelete (const std::string &resource, const std::string &payload) |
void | sendResponse (const Json::Value &response) |
void | sendErrorResponse (int code, const std::string &error) |
void | sendErrorResponse (int code, const Json::Value &error) |
Arg | getArg () |
const std::string & | name () const |
Connection handler for an HttpMonitor.
Subclass and overwrite either the doGet() and doPost() function or only the handleHttpPayload() if you want access to the header.
This template uses the curiosly recurring templat pattern so Handler should be the subclass.
Definition at line 79 of file http_monitor.h.
virtual void Datacratic::HttpMonitorHandler< Handler, Arg >::doDelete | ( | const std::string & | resource, |
const std::string & | payload | ||
) | [inline, virtual] |
Handle a DELETE message on the given resource and payload.
Should call either sendResponse() or sendErrorResponse().
Definition at line 107 of file http_monitor.h.
virtual void Datacratic::HttpMonitorHandler< Handler, Arg >::doGet | ( | const std::string & | resource | ) | [inline, virtual] |
Handle a GET message on the given resource.
Should call either sendResponse() or sendErrorResponse().
Reimplemented in RTBKIT::RouterRestApiConnection.
Definition at line 93 of file http_monitor.h.
virtual void Datacratic::HttpMonitorHandler< Handler, Arg >::doPost | ( | const std::string & | resource, |
const std::string & | payload | ||
) | [inline, virtual] |
Handle a POST message on the given resource and payload.
Should call either sendResponse() or sendErrorResponse().
Reimplemented in RTBKIT::RouterRestApiConnection.
Definition at line 100 of file http_monitor.h.
void Datacratic::HttpMonitorHandler< Handler, arg >::handleHttpPayload | ( | const HttpHeader & | header, |
const std::string & | payload | ||
) | [virtual] |
Override to access the full header.
Reimplemented from Datacratic::HttpConnectionHandler.
Definition at line 139 of file http_monitor.h.