2014-03-21 13:42:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Server.h"
|
2016-01-21 01:47:28 +00:00
|
|
|
#include <DB/Common/CurrentMetrics.h>
|
2014-03-21 13:42:14 +00:00
|
|
|
|
|
|
|
|
2016-10-24 04:06:27 +00:00
|
|
|
namespace CurrentMetrics
|
|
|
|
{
|
|
|
|
extern const Metric InterserverConnection;
|
|
|
|
}
|
|
|
|
|
2014-03-21 13:42:14 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class InterserverIOHTTPHandler : public Poco::Net::HTTPRequestHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InterserverIOHTTPHandler(Server & server_)
|
|
|
|
: server(server_)
|
2014-04-29 20:22:57 +00:00
|
|
|
, log(&Logger::get("InterserverIOHTTPHandler"))
|
2014-03-21 13:42:14 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-10-10 08:44:52 +00:00
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
2014-03-21 13:42:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Server & server;
|
2016-01-21 01:47:28 +00:00
|
|
|
CurrentMetrics::Increment metric_increment{CurrentMetrics::InterserverConnection};
|
2014-03-21 13:42:14 +00:00
|
|
|
Logger * log;
|
|
|
|
|
|
|
|
void processQuery(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|