Package PyMonitor :: Module monitor :: Class Monitor
[show private | hide private]
[frames | no frames]

Class Monitor


Monitor defines the API visible for the client.
Method Summary
list listobjects(self)
Returns a list of all active instances class names from the GC.
list probe(self, name)
Return a list that contains information about all intances with the given class name given in parameter name.
string version(self)
Returns the version number of the MonitorServer.

Method Details

listobjects(self)

Returns a list of all active instances class names from the GC. If there is more that one active instance of an object the list will only contain once of these.

Example of what is retuned: ['MonitorServer', 'Monitor', 'SimpleXMLRPCServer']
Returns:
A list containing all known instances availible.
           (type=list)

probe(self, name)

Return a list that contains information about all intances with the given class name given in parameter name.

Information in the list is a dictionary with following attributes:
  • name the specific instance name returned by the instance repr method.
  • type the specific instance class name
  • attributes A list contains an instance attributes and value. Each element in the attributes list is an tuple containing attribute name and it's value.
Example of what is returned: [{'name': '<MonitorServer instance at 0x01a765734', 'type': 'MonitorServer', 'attributes': [('addr', '('127.0.0.1', 8881)'), ('srv', '<SimpleXMLRPCServer instance at 0x01a785792>')]}, ... ]
Parameters:
name - Name of object to probe for.
           (type=string)
Returns:
A list of dictionaries containing information about instances.
           (type=list)

version(self)

Returns the version number of the MonitorServer.
Returns:
MonitorServer version number
           (type=string)

Generated by Epydoc 2.0 on Sat Apr 10 17:08:45 2004 http://epydoc.sf.net