 |
Kea
1.5.0
|
Go to the documentation of this file.
14 #include <boost/noncopyable.hpp>
49 class Daemon :
public boost::noncopyable {
86 static void loggerInit(
const char* log_name,
bool verbose);
209 return (default_logger_name_);
217 default_logger_name_ =
logger;
253 std::string config_file_;
256 std::string proc_name_;
260 std::string pid_file_dir_;
266 static bool verbose_;
269 static std::string default_logger_name_;
272 bool am_file_author_;
virtual size_t writeConfigFile(const std::string &config_file, isc::data::ConstElementPtr cfg=isc::data::ConstElementPtr()) const
Writes current configuration to specified file.
isc::util::SignalHandler signal_handler_
Pointer to the common signal handler invoked by the handleSignal function.
virtual void handleSignal()
Invokes handler for the next received signal.
virtual void shutdown()
Initiates shutdown procedure for the whole DHCPv6 server.
void checkConfigFile() const
Checks the configuration file name.
virtual void cleanup()
Performs final deconfiguration.
void setPIDFileDir(const std::string &pid_file_dir)
Sets the PID file directory.
std::string getConfigFile() const
Returns config file name.
static void configureLogger(const isc::data::ConstElementPtr &log_config, const isc::process::ConfigPtr &storage)
Configures logger.
boost::function< void(int signum)> SignalHandler
Pointer to the signal handling function.
Base class for all services.
static bool getVerbose()
Returns if running in verbose mode.
static void loggerInit(const char *log_name, bool verbose)
Initializes logger.
void createPIDFile(int pid=0)
Creates the PID file.
This is a base class for exceptions thrown from the DNS library module.
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the SrvConfig.
Defines the logger used by the top-level component of kea-dhcp-ddns.
isc::util::SignalSetPtr signal_set_
A pointer to the object installing custom signal handlers.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
boost::shared_ptr< SignalSet > SignalSetPtr
Pointer to the isc::util::SignalSet.
DaemonPIDExists(const char *file, size_t line, const char *what)
std::string makePIDFileName() const
Manufacture the pid file name.
static std::string getVersion(bool extended)
returns Kea version on stdout and exits.
void setPIDFileName(const std::string &pid_file_name)
Sets PID file name.
std::string getProcName() const
returns the process name This value is used as when forming the default PID file name
isc::log::Logger logger("asiodns")
Use the ASIO logger.
virtual ~Daemon()
Destructor.
void setProcName(const std::string &proc_name)
Sets the process name.
std::string getPIDFileDir() const
Returns the directory used when forming default PID file name.
Exception thrown when a the PID file points to a live PID.
static void setVerbose(const bool verbose)
Sets or clears verbose mode.
Daemon()
Default constructor.
std::string getPIDFileName() const
Returns the current PID file name.
void setConfigFile(const std::string &config_file)
Sets the configuration file name.
boost::shared_ptr< PIDFile > PIDFilePtr
Defines a shared pointer to a PIDFile.
static void setDefaultLoggerName(const std::string &logger)
Sets the default logger name.
boost::shared_ptr< const Element > ConstElementPtr
static std::string getDefaultLoggerName()
Returns default logger name.