class documentation

class ProcessMonitor(Thread):

Constructor: ProcessMonitor(name)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method add_process_listener Listener for process events. MUST be called before ProcessMonitor is running.See ProcessListener class. @param l: listener instance @type l: L{ProcessListener}
Method get_active_names @return [str]: list of active process names
Method get_process @return: process registered under \x07 name, or None @rtype: L{Process}
Method get_process_names_with_spawn_count @return: Two lists, where first list of active process names along with the number of times that process has been spawned. Second list contains dead process names and their spawn count. @rtype: [[(str, int),], [(str,int),]]...
Method has_process @return: True if process is still be monitored. If False, process has died or was never registered with process @rtype: bool
Method kill_process Kill process that matches name. NOTE: a killed process will continue to show up as active until the process monitor thread has caught that it has died. @param name: Process name @type name: str @return: True if a process named name was removed from process monitor...
Method register Register process with L{ProcessMonitor} @param p: Process @type p: L{Process} @raise PmonException: if process with same name is already registered
Method register_core_proc Register core process with ProcessMonitor. Coreprocesses have special shutdown semantics. They are killed after all other processes, in reverse order in which they are added. @param p Process @type p: L{Process} @raise PmonException: if process with same name is already registered...
Method registrations_complete Inform the process monitor that registrations are complete. After the registrations_complete flag is set, process monitor will exit if there are no processes left to monitor.
Method run thread routine of the process monitor.
Method shutdown Shutdown the process monitor thread
Method unregister Undocumented
Instance Variable core_procs Undocumented
Instance Variable dead_list Undocumented
Instance Variable done Undocumented
Instance Variable is_shutdown Undocumented
Instance Variable listeners Undocumented
Instance Variable plock Undocumented
Instance Variable procs Undocumented
Method _post_run Undocumented
Method _run Internal run loop of ProcessMonitor
Instance Variable _registrations_complete Undocumented
def __init__(self, name='ProcessMonitor'):

Undocumented

def add_process_listener(self, l):

Listener for process events. MUST be called before ProcessMonitor is running.See ProcessListener class. @param l: listener instance @type l: L{ProcessListener}

def get_active_names(self):

@return [str]: list of active process names

def get_process(self, name):

@return: process registered under \x07 name, or None @rtype: L{Process}

def get_process_names_with_spawn_count(self):

@return: Two lists, where first list of active process names along with the number of times that process has been spawned. Second list contains dead process names and their spawn count. @rtype: [[(str, int),], [(str,int),]]

def has_process(self, name):

@return: True if process is still be monitored. If False, process has died or was never registered with process @rtype: bool

def kill_process(self, name):

Kill process that matches name. NOTE: a killed process will continue to show up as active until the process monitor thread has caught that it has died. @param name: Process name @type name: str @return: True if a process named name was removed from process monitor. A process is considered killed if its stop() method was called. @rtype: bool

def register(self, p):

Register process with L{ProcessMonitor} @param p: Process @type p: L{Process} @raise PmonException: if process with same name is already registered

def register_core_proc(self, p):

Register core process with ProcessMonitor. Coreprocesses have special shutdown semantics. They are killed after all other processes, in reverse order in which they are added. @param p Process @type p: L{Process} @raise PmonException: if process with same name is already registered

def registrations_complete(self):

Inform the process monitor that registrations are complete. After the registrations_complete flag is set, process monitor will exit if there are no processes left to monitor.

def run(self):

thread routine of the process monitor.

def shutdown(self):

Shutdown the process monitor thread

def unregister(self, p):

Undocumented

core_procs: list =

Undocumented

dead_list: list =

Undocumented

done: bool =

Undocumented

is_shutdown: bool =

Undocumented

listeners: list =

Undocumented

plock =

Undocumented

procs: list =

Undocumented

def _post_run(self):

Undocumented

def _run(self):

Internal run loop of ProcessMonitor

_registrations_complete: bool =

Undocumented