Module server :: Class Co2Server
[show private | hide private]
[frames | no frames]

Class Co2Server

        BaseServer --+        
                     |        
             TCPServer --+    
                         |    
SimpleXMLRPCDispatcher --+    
                         |    
        SimpleXMLRPCServer --+
                             |
                            Co2Server


co2 specific subclass of SimpleXMLRPCServer.SimpleXMLRPCServer.
Method Summary
  __init__(self, vars)
first calls the SimpleXMLRPCServer.SimpleXMLRPCServer's init, then does some co2 stuff.
  __repr__(self)
  __str__(self)
  clean_up(self)
clean up on server exit.
  close_request(self, request)
Called to clean up an individual request. (inherited from TCPServer)
  fileno(self)
Return socket file number. (inherited from TCPServer)
  get_request(self)
Get the request and client address from the socket. (inherited from TCPServer)
  listen(self)
start the handle-request loop.
  process_request_thread(self, request, client_address)
Same as in BaseHTTPServer but as a thread and, in addition, exception handling is done here.
  process_request_threaded(self, request, client_address)
start a new thread to process the request.
  register_exit_hook(self, method)
register a method to be called on server exit.
  register_function(self, function, name)
Registers a function to respond to XML-RPC requests. (inherited from SimpleXMLRPCDispatcher)
  register_instance(self, instance)
register a registry.Co2Registryinstance which will handle xmlrpc calls.
  register_introspection_functions(self)
Registers the XML-RPC introspection methods in the system namespace. (inherited from SimpleXMLRPCDispatcher)
  register_multicall_functions(self)
Registers the XML-RPC multicall method in the system namespace. (inherited from SimpleXMLRPCDispatcher)
  server_activate(self)
Called by constructor to activate the server. (inherited from TCPServer)
  server_bind(self)
Called by constructor to bind the socket. (inherited from TCPServer)
  server_close(self)
Called to clean-up the server. (inherited from TCPServer)
  system_listMethods(self)
system.listMethods() => ['add', 'subtract', 'multiple'] (inherited from SimpleXMLRPCDispatcher)
  system_methodHelp(self, method_name)
system.methodHelp('add') => "Adds two integers together" (inherited from SimpleXMLRPCDispatcher)
  system_methodSignature(self, method_name)
system.methodSignature('add') => [double, int, int] (inherited from SimpleXMLRPCDispatcher)
  system_multicall(self, call_list)
system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...] (inherited from SimpleXMLRPCDispatcher)

Class Variable Summary
int allow_reuse_address

Method Details

__init__(self, vars)
(Constructor)

first calls the SimpleXMLRPCServer.SimpleXMLRPCServer's init, then does some co2 stuff.
Parameters:
vars - server specific variables
           (type=dictionary)

clean_up(self)

clean up on server exit. call registered exit hooks, wait a little, then the server exits, because this is the last thing done.

listen(self)

start the handle-request loop.

process_request_thread(self, request, client_address)

Same as in BaseHTTPServer but as a thread and, in addition, exception handling is done here.
Parameters:
request -
           (type=)
client_address - address of the requesting host
           (type=tuple (<host>, <port>))

process_request_threaded(self, request, client_address)

start a new thread to process the request. calls Co2Server.process_request_thread in a thread. parameters are equivalent to that method's.

register_exit_hook(self, method)

register a method to be called on server exit.
Parameters:
method - method to be registered as exit hook
           (type=method object)

register_instance(self, instance)

register a registry.Co2Registry instance which will handle xmlrpc calls.

SimpleXMLRPCServer.SimpleXMLRPCServer's register_instance method is called first, then the methods of the registry are converted to html (served to clients via GET requests and the server's properties are added to the registry's properties.

Class Variable Details

allow_reuse_address

Type:
int
Value:
1                                                                      

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