| Trees | Index | Help |
|
|---|
| Module SimpleXMLRPCServer :: Class SimpleXMLRPCDispatcher |
|
SimpleXMLRPCServerMix-in class that dispatches XML-RPC requests.
This class is used to register XML-RPC method handlers and then to dispatch them. There should never be any reason to instantiate this class directly.| Method Summary | |
|---|---|
__init__(self)
| |
Registers a function to respond to XML-RPC requests. | |
Registers an instance to respond to XML-RPC requests. | |
Registers the XML-RPC introspection methods in the system namespace. | |
Registers the XML-RPC multicall method in the system namespace. | |
system.listMethods() => ['add', 'subtract', 'multiple'] | |
system.methodHelp('add') => "Adds two integers together" | |
system.methodSignature('add') => [double, int, int] | |
system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...] | |
| Method Details |
|---|
register_function(self, function, name=None)Registers a function to respond to XML-RPC requests. The optional name argument can be used to set a Unicode name for the function. |
register_instance(self, instance)Registers an instance to respond to XML-RPC requests. Only one instance can be installed at a time. If the registered instance has a _dispatch method then that method will be called with the name of the XML-RPC method and it's parameters as a tuple e.g. instance._dispatch('add',(2,3)) If the registered instance does not have a _dispatch method then the instance will be searched to find a matching method and, if found, will be called. Methods beginning with an '_' are considered private and will not be called by SimpleXMLRPCServer. If a registered function matches a XML-RPC request, then it will be called instead of the registered instance. |
register_introspection_functions(self)Registers the XML-RPC introspection methods in the system namespace. see http://xmlrpc.usefulinc.com/doc/reserved.html |
register_multicall_functions(self)Registers the XML-RPC multicall method in the system namespace. see http://www.xmlrpc.com/discuss/msgReader$1208 |
system_listMethods(self)system.listMethods() => ['add', 'subtract', 'multiple'] Returns a list of the methods supported by the server. |
system_methodHelp(self, method_name)system.methodHelp('add') => "Adds two integers together" Returns a string containing documentation for the specified method. |
system_methodSignature(self, method_name)system.methodSignature('add') => [double, int, int] Returns a list describing the signiture of the method. In the above example, the add method takes two integers as arguments and returns a double result. This server does NOT support system.methodSignature. |
system_multicall(self, call_list)system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...] Allows the caller to package multiple XML-RPC calls into a single request. See http://www.xmlrpc.com/discuss/msgReader$1208 |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 1.1 on Thu Oct 16 16:37:23 2003 | http://epydoc.sf.net |