2012-12-14 11:21:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Server.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2012-12-14 13:31:48 +00:00
|
|
|
/// Обработчик http-запросов в формате OLAP-server.
|
2012-12-14 11:21:07 +00:00
|
|
|
class OLAPHTTPHandler : public Poco::Net::HTTPRequestHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
OLAPHTTPHandler(Server & server_)
|
|
|
|
: server(server_)
|
|
|
|
, log(&Logger::get("OLAPHTTPHandler"))
|
|
|
|
{
|
|
|
|
LOG_TRACE(log, "In constructor.");
|
|
|
|
}
|
|
|
|
|
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Server & server;
|
|
|
|
|
|
|
|
Logger * log;
|
|
|
|
|
|
|
|
void processQuery(Poco::Net::HTTPServerResponse & response, std::istream & istr);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|