19#include <boost/shared_ptr.hpp>
20#include <boost/noncopyable.hpp>
151 virtual void launch(
int argc,
char* argv[],
const bool test_mode);
397 return (check_only_);
413 return (io_service_);
421 return (controller_);
482 static_cast<void>(input);
573 void usage(
const std::string& text);
588 std::string app_name_;
593 std::string bin_name_;
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Exception thrown when the controller encounters an operational error.
DControllerBaseError(const char *file, size_t line, const char *what)
void setVerbose(bool value)
Method for enabling or disabling verbose logging.
isc::data::ConstElementPtr buildReportHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for 'build-report' command
void runProcess()
Invokes the application process's event loop,(DBaseProcess::run).
void initProcess()
Instantiates the application process and then initializes it.
virtual std::string getVersionAddendum()
Fetches text containing additional version specifics.
asiolink::IOServicePtr & getIOService()
Getter for fetching the controller's IOService.
static DControllerBasePtr & getController()
Static getter which returns the singleton instance.
isc::data::ConstElementPtr shutdownProcess(isc::data::ConstElementPtr args)
Initiates shutdown procedure.
virtual const std::string getCustomOpts() const
Virtual method which returns a string containing the option letters for any custom command line optio...
virtual void processSignal(int signum)
Application-level signal processing method.
std::string getBinName() const
Fetches the name of the application executable.
virtual ~DControllerBase()
Destructor.
bool osSignalHandler(int signum)
Handler for processing OS-level signals.
isc::data::ConstElementPtr configWriteHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for config-write command
static void setController(const DControllerBasePtr &controller)
Static setter which sets the singleton instance.
isc::data::ConstElementPtr versionGetHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for version-get command
void ioSignalHandler(IOSignalId sequence_id)
Handler for processing IOSignals.
void initSignalHandling()
Initializes signal handling.
virtual const std::string getUsageText() const
Virtual method which can be used to contribute derivation specific usage text.
virtual isc::data::ConstElementPtr checkConfig(isc::data::ConstElementPtr new_config)
Instance method invoked by the configuration event handler and which processes the actual configurati...
bool isVerbose() const
Supplies whether or not verbose logging is enabled.
virtual DProcessBase * createProcess()=0
Abstract method that is responsible for instantiating the application process object.
bool isCheckOnly() const
Supplies whether or not check only mode is enabled.
void setCheckOnly(bool value)
Method for enabling or disabling check only mode.
isc::data::ConstElementPtr configGetHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for config-get command
DProcessBasePtr getProcess()
Fetches the current process.
void parseArgs(int argc, char *argv[])
Processes the command line arguments.
virtual isc::data::ConstElementPtr parseText(const std::string &input)
Parse text into Elements.
virtual bool customOption(int option, char *optarg)
Virtual method that provides derivations the opportunity to support additional command line options.
isc::data::ConstElementPtr configTestHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for config-test command
std::string getAppName() const
Fetches the name of the application under control.
virtual isc::data::ConstElementPtr parseFile(const std::string &file_name)
Parse a given file into Elements.
virtual isc::data::ConstElementPtr configFromFile()
Reconfigures the process from a configuration file.
std::string getVersion(bool extended)
returns Kea version on stdout and exit.
virtual isc::data::ConstElementPtr updateConfig(isc::data::ConstElementPtr new_config)
Instance method invoked by the configuration event handler and which processes the actual configurati...
friend class DControllerTest
void checkConfigOnly()
Check the configuration.
virtual void launch(int argc, char *argv[], const bool test_mode)
Acts as the primary entry point into the controller execution and provides the outermost application ...
isc::data::ConstElementPtr shutdownHandler(const std::string &command, isc::data::ConstElementPtr args)
handler for 'shutdown' command
Application Process Interface.
Base class for all services.
Exception thrown when the command line is invalid.
InvalidUsage(const char *file, size_t line, const char *what)
Exception thrown when the controller launch fails.
LaunchError(const char *file, size_t line, const char *what)
Exception thrown when the application process fails.
ProcessInitError(const char *file, size_t line, const char *what)
Exception thrown when the application process encounters an operation in its event loop (i....
ProcessRunError(const char *file, size_t line, const char *what)
Exception used to convey version info upwards.
VersionMessage(const char *file, size_t line, const char *what)
Logging initialization functions.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< IOSignalQueue > IOSignalQueuePtr
Defines a pointer to an IOSignalQueue.
uint64_t IOSignalId
Defines a unique identifier type for IOSignal.
boost::shared_ptr< DProcessBase > DProcessBasePtr
Defines a shared pointer to DProcessBase.
boost::shared_ptr< DControllerBase > DControllerBasePtr
Defines the logger used by the top-level component of kea-dhcp-ddns.