libmoost
|
#include <service.hpp>
Classes | |
struct | default_parent_exit_func |
struct | enable_logger_func |
struct | noop_child_init_func |
class | service_wrapper |
Public Member Functions | |
service (boost::shared_ptr< ServiceT > service) | |
~service () | |
bool | set_log_level (const std::string &log_level) |
std::string | name () const |
void | set_shell_port (unsigned short shell_port) |
void | set_appender_factory (moost::service::appender_factory_ptr factory) |
void | set_default_stdout_state (bool enabled) |
void | set_default_stderr_state (bool enabled) |
void | set_child_init_func (boost::function0< bool > child_init_func) |
void | set_parent_exit_func (boost::function1< void, pid_t > parent_exit_func) |
void | run (bool daemonise=false) |
void | quit (const std::string &msg="") |
void | set_pidfile (const std::string &pidfile) |
boost::shared_ptr< ServiceT > | get_service () |
Private Types | |
typedef moost::service::remote_shell < service_wrapper > | remote_shell_t |
Private Member Functions | |
void | quit_handler () |
Private Attributes | |
service_wrapper | m_svc |
std::string | m_pidfile_name |
bool | m_started |
bool | m_daemonised |
boost::scoped_ptr < moost::process::pidfile > | m_pidfile |
unsigned short | m_shell_port |
boost::scoped_ptr< remote_shell_t > | m_remote_shell |
moost::service::appender_factory_ptr | m_app_factory |
moost::process::sleeper | m_sleeper |
bool | m_default_stdout_state |
bool | m_default_stderr_state |
boost::function0< bool > | m_child_init_func |
boost::function1< void, pid_t > | m_parent_exit_func |
Definition at line 325 of file service.hpp.
typedef moost::service::remote_shell<service_wrapper> moost::process::service< ServiceT, ConsoleLoggerPolicy >::remote_shell_t [private] |
Definition at line 652 of file service.hpp.
moost::process::service< ServiceT, ConsoleLoggerPolicy >::service | ( | boost::shared_ptr< ServiceT > | service | ) | [inline] |
Definition at line 467 of file service.hpp.
moost::process::service< ServiceT, ConsoleLoggerPolicy >::~service | ( | ) | [inline] |
Definition at line 479 of file service.hpp.
boost::shared_ptr<ServiceT> moost::process::service< ServiceT, ConsoleLoggerPolicy >::get_service | ( | ) | [inline] |
std::string moost::process::service< ServiceT, ConsoleLoggerPolicy >::name | ( | ) | const [inline] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::quit | ( | const std::string & | msg = "" | ) | [inline] |
Definition at line 613 of file service.hpp.
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::quit_handler | ( | ) | [inline, private] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::run | ( | bool | daemonise = false | ) | [inline] |
Definition at line 528 of file service.hpp.
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_appender_factory | ( | moost::service< ServiceT, ConsoleLoggerPolicy >::appender_factory_ptr | factory | ) | [inline] |
Definition at line 503 of file service.hpp.
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_child_init_func | ( | boost::function0< bool > | child_init_func | ) | [inline] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_default_stderr_state | ( | bool | enabled | ) | [inline] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_default_stdout_state | ( | bool | enabled | ) | [inline] |
Definition at line 508 of file service.hpp.
bool moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_log_level | ( | const std::string & | log_level | ) | [inline] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_parent_exit_func | ( | boost::function1< void, pid_t > | parent_exit_func | ) | [inline] |
Definition at line 523 of file service.hpp.
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_pidfile | ( | const std::string & | pidfile | ) | [inline] |
void moost::process::service< ServiceT, ConsoleLoggerPolicy >::set_shell_port | ( | unsigned short | shell_port | ) | [inline] |
moost::service::appender_factory_ptr moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_app_factory [private] |
Definition at line 661 of file service.hpp.
boost::function0<bool> moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_child_init_func [private] |
Definition at line 665 of file service.hpp.
bool moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_daemonised [private] |
Definition at line 657 of file service.hpp.
bool moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_default_stderr_state [private] |
Definition at line 664 of file service.hpp.
bool moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_default_stdout_state [private] |
Definition at line 663 of file service.hpp.
boost::function1<void, pid_t> moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_parent_exit_func [private] |
Definition at line 666 of file service.hpp.
boost::scoped_ptr<moost::process::pidfile> moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_pidfile [private] |
Definition at line 658 of file service.hpp.
std::string moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_pidfile_name [private] |
Definition at line 655 of file service.hpp.
boost::scoped_ptr<remote_shell_t> moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_remote_shell [private] |
Definition at line 660 of file service.hpp.
unsigned short moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_shell_port [private] |
Definition at line 659 of file service.hpp.
moost::process::sleeper moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_sleeper [private] |
Definition at line 662 of file service.hpp.
bool moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_started [private] |
Definition at line 656 of file service.hpp.
service_wrapper moost::process::service< ServiceT, ConsoleLoggerPolicy >::m_svc [private] |
Definition at line 654 of file service.hpp.