2017-08-09 11:57:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
#include <Interpreters/Context_fwd.h>
|
|
|
|
|
2020-05-27 17:52:52 +00:00
|
|
|
namespace Poco
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace Util
|
|
|
|
{
|
|
|
|
class LayeredConfiguration;
|
|
|
|
}
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2020-05-27 17:52:52 +00:00
|
|
|
class Logger;
|
2017-08-09 11:57:09 +00:00
|
|
|
|
2020-05-27 17:52:52 +00:00
|
|
|
}
|
2017-08-09 14:33:07 +00:00
|
|
|
|
|
|
|
|
2017-08-09 11:57:09 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class IServer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// Returns the application's configuration.
|
|
|
|
virtual Poco::Util::LayeredConfiguration & config() const = 0;
|
|
|
|
|
|
|
|
/// Returns the application's logger.
|
|
|
|
virtual Poco::Logger & logger() const = 0;
|
|
|
|
|
|
|
|
/// Returns global application's context.
|
2021-04-10 23:33:54 +00:00
|
|
|
virtual ContextPtr context() const = 0;
|
2017-08-09 11:57:09 +00:00
|
|
|
|
2017-08-09 14:33:07 +00:00
|
|
|
/// Returns true if shutdown signaled.
|
|
|
|
virtual bool isCancelled() const = 0;
|
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
virtual ~IServer() = default;
|
2017-08-09 11:57:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|