Module satellite_registry :: Class Co2SatelliteRegistry
[show private | hide private]
[frames | no frames]

Class Co2SatelliteRegistry

Co2Registry --+
              |
             Co2SatelliteRegistry


Co2SatelliteRegistry: provides the satellite specific methods.
Method Summary
  __init__(self, vars)
__init__(vars): first calls Co2Registry's __init__, then does some initial stuff for its own (register with the relay).
  __str__(self)
(inherited from Co2Registry)

string

callable as: co2.get_method_help, sys.methodHelp, web.get_method_help
x_co2_get_method_help(self, param_dict)
get help (the __doc__ string) for a specific method. (inherited from Co2Registry)

list of strings

callable as: co2.co2_get_method_names, sys.listMethods, web.get_method_names
x_co2_get_method_names(self, param_dict)
get the names of available methods. (inherited from Co2Registry)

dictionary: 'args': list of argument names (strings), 'args_d': dictionary (key=argument name, value=argument value), 'args_v': list of variable arguments (unused in xmlrpc), 'args_kw': list of keyword arguments (unused in xmlrpc)

callable as: co2.get_method_signature, sys.methodSignature, web.get_method_signature
x_co2_get_method_signature(self, param_dict)
get a discription of how to use a specific method. (inherited from Co2Registry)

dictionary [key: value-type (description)]: co2_author: string (server author); kernel: string (host kernel name); uptime: int (server uptime in seconds); operating_system: string (host operating system); maintainer: string (server maintainer); start_time: DateTime (server start time); sw_platform: string (co2 software platform); hw_platform: string (host hardware platform); co2_version: string (co2 version); maintainer_email: string (server maintainer email); hardware: string (host hardware); plugins: list of strings (loaded plugins); server_time: DateTime (server time); processor: string (host processor)

callable as: system.get_properties, web.get_properties
x_sys_get_properties(self, param_dict)
get system properties. (inherited from Co2Registry)

list of strings

callable as: co2.co2_get_method_names, sys.listMethods, web.get_method_names
x_sys_listMethods(self, param_dict)
get the names of available methods. (inherited from Co2Registry)

string

callable as: co2.get_method_help, sys.methodHelp, web.get_method_help
x_sys_methodHelp(self, param_dict)
get help (the __doc__ string) for a specific method. (inherited from Co2Registry)

dictionary: 'args': list of argument names (strings), 'args_d': dictionary (key=argument name, value=argument value), 'args_v': list of variable arguments (unused in xmlrpc), 'args_kw': list of keyword arguments (unused in xmlrpc)

callable as: co2.get_method_signature, sys.methodSignature, web.get_method_signature
x_sys_methodSignature(self, param_dict)
get a discription of how to use a specific method. (inherited from Co2Registry)
  x_top_call_method(self, param_dict)
'anonymized' call method. (inherited from Co2Registry)

string

exceptions thrown by a plugin's receive method are logged and ignored.

callable as: notify
x_top_notify(self, param_dict)
distributes incoming calls to all plugins' receive methods.

string

callable as: ping, web.ping
x_top_ping(self, param_dict)
answer a ping request. (inherited from Co2Registry)

param_dict

callable as: test, web.test
x_top_test(self, param_dict)
just a test method... (inherited from Co2Registry)
  x_web_call_method(self, param_dict)
'anonymized' call method. (inherited from Co2Registry)

string

callable as: co2.get_method_help, sys.methodHelp, web.get_method_help
x_web_get_method_help(self, param_dict)
get help (the __doc__ string) for a specific method. (inherited from Co2Registry)

list of strings

callable as: co2.co2_get_method_names, sys.listMethods, web.get_method_names
x_web_get_method_names(self, param_dict)
get the names of available methods. (inherited from Co2Registry)

dictionary: 'args': list of argument names (strings), 'args_d': dictionary (key=argument name, value=argument value), 'args_v': list of variable arguments (unused in xmlrpc), 'args_kw': list of keyword arguments (unused in xmlrpc)

callable as: co2.get_method_signature, sys.methodSignature, web.get_method_signature
x_web_get_method_signature(self, param_dict)
get a discription of how to use a specific method. (inherited from Co2Registry)

dictionary [key: value-type (description)]: co2_author: string (server author); kernel: string (host kernel name); uptime: int (server uptime in seconds); operating_system: string (host operating system); maintainer: string (server maintainer); start_time: DateTime (server start time); sw_platform: string (co2 software platform); hw_platform: string (host hardware platform); co2_version: string (co2 version); maintainer_email: string (server maintainer email); hardware: string (host hardware); plugins: list of strings (loaded plugins); server_time: DateTime (server time); processor: string (host processor)

callable as: system.get_properties, web.get_properties
x_web_get_properties(self, param_dict)
get system properties. (inherited from Co2Registry)

string

callable as: ping, web.ping
x_web_ping(self, param_dict)
answer a ping request. (inherited from Co2Registry)

param_dict

callable as: test, web.test
x_web_test(self, param_dict)
just a test method... (inherited from Co2Registry)
  _call_relay(self, method_name, param_dict)
start a thread that calls method_name with argument param_dict on the relay .
  _call_relay_thread(self, method_name, param_dict)
outgoing call to the relay.
  _check_notify(self, param_dict)
  _exit_hook(self)
_exit_hook(): clean up method, called by server on exit.
  _load_plugins(self, loader_vars, plugin_vars)
kick off the plugin loader. (inherited from Co2Registry)
  _load_system_methods(self)
register system (=internal) methods. (inherited from Co2Registry)
  _notify(self, recv_method, param_dict)
call registry.Co2Registry's _notify_thread method in a thread.
  _notify_thread(self, recv_method, param_dict)
call recv_method with param_dict as argument.
string _register(self)
make a register call to the relay.
  _register_method(self, name, method)
register a method to be callable through xmlrpc. (inherited from Co2Registry)
  _relay(self, data_dict)
dummy method to be overridden by subclasses (satellite_registry.Co2SatelliteRegistry and relay_registry.Co2RelayRegistry.
  _relay_real(self, data_dict)
convenience method on top of _call_relay().

Method Details

__init__(self, vars)
(Constructor)

__init__(vars): first calls Co2Registry's __init__, then does some initial stuff for its own (register with the relay).
Parameters:
vars - dictionary, registry specific variables.
           (type=dictionary.)

x_top_notify(self, param_dict)

distributes incoming calls to all plugins' receive methods. only
Parameters:
param_dict - data to be sent to plugins
           (type=dictionary)
Returns:
'OK'
           (type=

string

exceptions thrown by a plugin's receive method are logged and ignored.

callable as: notify)

_call_relay(self, method_name, param_dict={})

start a thread that calls method_name with argument param_dict on the relay .
Parameters:
method_name - name of the method to be called.
           (type=string.)
param_dict - optional parameter.
           (type=dictionary, default: {}.)

_call_relay_thread(self, method_name, param_dict)

outgoing call to the relay. exceptions are cought and not passed on to the calling host, except when method_name is 'relay.register' a Co2RegistryError is raised, so that satellites can react, probably exit.
Parameters:
method_name - name of the relay's method to be called.
           (type=string.)
param_dict - argument to be passed to the method.
           (type=dictionary.)

_exit_hook(self)

_exit_hook(): clean up method, called by server on exit.

_notify(self, recv_method, param_dict)

call registry.Co2Registry's _notify_thread method in a thread.
Parameters:
recv_method - the method to call
           (type=method object)
param_dict - argument to recv_method
           (type=dictionary)

_notify_thread(self, recv_method, param_dict)

call recv_method with param_dict as argument. called by registry.Co2Registry's x_top_notify method.
Parameters:
recv_method - the method to call
           (type=method object)
param_dict - argument to recv_method
           (type=dictionary)

_register(self)

make a register call to the relay. returns a new host_id.
Returns:
host id
           (type=string)

_relay(self, data_dict)

dummy method to be overridden by subclasses (satellite_registry.Co2SatelliteRegistry and relay_registry.Co2RelayRegistry.
Parameters:
data_dict - data to be relayed
           (type=dictionary)
Overrides:
registry.Co2Registry._relay (inherited documentation)

_relay_real(self, data_dict)

convenience method on top of _call_relay(). equivalent to _call_relay('relay.relay', data_dict).
Parameters:
data_dict - data to be relayed.
           (type=dictionary.)

Generated by Epydoc 1.1 on Thu Oct 16 16:37:23 2003 http://epydoc.sf.net