RLRP routing  v.0.1.0
Node_init.Daemon Class Reference

A class used for creating and managing the application daemon. More...

Inheritance diagram for Node_init.Daemon:
Inheritance graph
Collaboration diagram for Node_init.Daemon:
Collaboration graph

Public Member Functions

def __init__ (self, pidfile, stdin="/dev/null", stdout=REDIRECT_TO, stderr=REDIRECT_TO)
 Constructor. More...
 
def daemonize (self)
 Daemonize the process and do all the routine related to that. More...
 
def del_pid (self)
 Delete the pid file. More...
 
def start (self)
 Start the daemon. More...
 
def stop (self)
 Stop the daemon. More...
 
def restart (self)
 Restart the daemon. More...
 
def run (self)
 Default method for overriding by the child class which inherited the Daemon. More...
 

Public Attributes

 stdin
 
 stdout
 
 stderr
 
 pidfile
 

Detailed Description

A class used for creating and managing the application daemon.

A generic daemon class for starting the main running function by overriding the run() method.

Constructor & Destructor Documentation

def Node_init.Daemon.__init__ (   self,
  pidfile,
  stdin = "/dev/null",
  stdout = REDIRECT_TO,
  stderr = REDIRECT_TO 
)

Constructor.

Parameters
selfThe object pointer.
pidfileAn absolute path to the pid file of the process.
stdinPath for stdin forwarding
stdoutPath for stdout forwarding
stderrPath for stderr forwarding

Member Function Documentation

def Node_init.Daemon.daemonize (   self)

Daemonize the process and do all the routine related to that.

Parameters
selfThe object pointer.

Here is the call graph for this function:

Here is the caller graph for this function:

def Node_init.Daemon.del_pid (   self)

Delete the pid file.

Parameters
selfThe object pointer.

Here is the caller graph for this function:

def Node_init.Daemon.restart (   self)

Restart the daemon.

Parameters
selfThe object pointer.

Here is the call graph for this function:

def Node_init.Daemon.run (   self)

Default method for overriding by the child class which inherited the Daemon.

It will be called after the process has been daemonized by start() or restart().

Parameters
selfThe object pointer.

Here is the caller graph for this function:

def Node_init.Daemon.start (   self)

Start the daemon.

Parameters
selfThe object pointer.

Here is the call graph for this function:

Here is the caller graph for this function:

def Node_init.Daemon.stop (   self)

Stop the daemon.

Parameters
selfThe object pointer.

Here is the caller graph for this function:

Member Data Documentation

Node_init.Daemon.pidfile
Node_init.Daemon.stderr
Node_init.Daemon.stdin
Node_init.Daemon.stdout

The documentation for this class was generated from the following file: