ClickHouse/src/Server/HTTPRequestHandlerFactoryMain.h

28 lines
640 B
C++
Raw Normal View History

2022-11-10 08:23:52 +00:00
#pragma once
#include <Server/HTTP/HTTPRequestHandlerFactory.h>
#include <vector>
namespace DB
{
/// Handle request using child handlers
class HTTPRequestHandlerFactoryMain : public HTTPRequestHandlerFactory
{
public:
explicit HTTPRequestHandlerFactoryMain(const std::string & name_);
void addHandler(HTTPRequestHandlerFactoryPtr child_factory) { child_factories.emplace_back(child_factory); }
std::unique_ptr<HTTPRequestHandler> createRequestHandler(const HTTPServerRequest & request) override;
private:
Poco::Logger * log;
std::string name;
std::vector<HTTPRequestHandlerFactoryPtr> child_factories;
};
}