7#ifndef LFC_CONTROLLER_H
8#define LFC_CONTROLLER_H
79 void launch(
int argc,
char* argv[],
const bool test_mode);
109 return (protocol_version_);
116 return (config_file_);
123 return (previous_file_);
137 return (output_file_);
144 return (finish_file_);
157 int protocol_version_;
160 std::string config_file_;
161 std::string previous_file_;
162 std::string copy_file_;
163 std::string output_file_;
164 std::string finish_file_;
165 std::string pid_file_;
171 void usage(
const std::string& text);
177 std::string getVersion(
const bool extended)
const;
190 template<
typename LeaseObjectType,
typename LeaseFileType,
typename StorageType>
191 void processLeases()
const;
197 void startLogger(
const bool test_mode)
const;
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 command line is invalid.
InvalidUsage(const char *file, size_t line, const char *what)
Process controller for LFC process.
void fileRotate() const
Rotate files.
void launch(int argc, char *argv[], const bool test_mode)
Acts as the primary entry point to start execution of the process.
int getProtocolVersion() const
Gets the protocol version of the leases files.
LFCController()
Constructor.
std::string getFinishFile() const
Gets the finish file name.
std::string getPidFile() const
Gets the pid file name.
~LFCController()
Destructor.
std::string getCopyFile() const
Gets the copy file name.
static const char * lfc_bin_name_
Defines the executable name, by convention this should match the executable name.
void parseArgs(int argc, char *argv[])
Process the command line arguments.
static const char * lfc_app_name_
Defines the application name, it may be used to locate configuration data and appears in log statemen...
std::string getPreviousFile() const
Gets the previous file name.
std::string getOutputFile() const
Gets the output file name.
std::string getConfigFile() const
Gets the config file name.
Exceptions thrown when a method is unable to manipulate (remove or rename) a file.
RunTimeFail(const char *file, size_t line, const char *what)
Defines the logger used by the top-level component of kea-lfc.