 |
Kea
1.5.0
|
Go to the documentation of this file.
14 #include <boost/shared_ptr.hpp>
29 static const std::string VERSION_GET_COMMAND(
"version-get");
32 static const std::string BUILD_REPORT_COMMAND(
"build-report");
35 static const std::string CONFIG_GET_COMMAND(
"config-get");
38 static const std::string CONFIG_WRITE_COMMAND(
"config-write");
41 static const std::string CONFIG_TEST_COMMAND(
"config-test");
44 static const std::string SHUT_DOWN_COMMAND(
"shutdown");
47 static const int COMMAND_SUCCESS = 0;
50 static const int COMMAND_ERROR = 1;
53 static const int COMMAND_INVALID = 2;
81 : app_name_(app_name), io_service_(io_service), shut_down_flag_(false),
137 bool check_only =
false) = 0;
146 return (shut_down_flag_);
153 shut_down_flag_ = value;
167 return (io_service_);
188 std::string app_name_;
194 bool shut_down_flag_;
void stopIOService()
Convenience method for stopping IOservice processing.
asiolink::IOServicePtr & getIoService()
Fetches the controller's IOService.
virtual void init()=0
May be used after instantiation to perform initialization unique to application.
virtual isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false)=0
Processes the given configuration.
virtual isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args)=0
Initiates the process's shutdown process.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Exception thrown if the process encountered an operational error.
virtual void run()=0
Implements the process's event loop.
virtual ~DProcessBase()
Destructor.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
bool shouldShutdown() const
Checks if the process has been instructed to shut down.
Application Process Interface.
void setShutdownFlag(bool value)
Sets the process shut down flag to the given value.
boost::shared_ptr< DCfgMgrBase > DCfgMgrBasePtr
Defines a shared pointer to DCfgMgrBase.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
DProcessBase(const char *app_name, asiolink::IOServicePtr io_service, DCfgMgrBasePtr cfg_mgr)
Constructor.
boost::shared_ptr< DProcessBase > DProcessBasePtr
Defines a shared pointer to DProcessBase.
DCfgMgrBasePtr & getCfgMgr()
Fetches the process's configuration manager.
boost::shared_ptr< const Element > ConstElementPtr
const std::string getAppName() const
Fetches the application name.
DProcessBaseError(const char *file, size_t line, const char *what)