8#include <userver/components/component_base.hpp>
9#include <userver/engine/task/task_processor_fwd.hpp>
10#include <userver/server/server.hpp>
11#include <userver/utils/statistics/entry.hpp>
13USERVER_NAMESPACE_BEGIN
48class Server
final :
public ComponentBase {
52 static constexpr std::string_view
kName =
"server";
54 Server(
const components::ComponentConfig& component_config,
const components::ComponentContext& component_context);
60 const server::Server& GetServer()
const;
62 server::Server& GetServer();
64 void AddHandler(
const server::handlers::HttpHandlerBase& handler, engine::TaskProcessor& task_processor);
66 static yaml_config::Schema GetStaticConfigSchema();
69 void WriteStatistics(utils::statistics::Writer& writer);
71 std::unique_ptr<server::Server> server_;
75inline constexpr bool kHasValidate<Server> =
true;