Home | History | Annotate | Download | only in python2.7

Lines Matching refs:instance

5 class instance, or by extending the SimpleXMLRPCServer
20 2. Install an instance:
41 3. Install an instance with custom dispatch method:
171 self.instance = None
175 def register_instance(self, instance, allow_dotted_names=False):
176 """Registers an instance to respond to XML-RPC requests.
178 Only one instance can be installed at a time.
180 If the registered instance has a _dispatch method then that
183 e.g. instance._dispatch('add',(2,3))
185 If the registered instance does not have a _dispatch method
186 then the instance will be searched to find a matching method
192 will be called instead of the registered instance.
195 instance does not have a _dispatch method, method names
208 self.instance = instance
284 if self.instance is not None:
285 # Instance can implement _listMethod to return a list of
287 if hasattr(self.instance, '_listMethods'):
289 methods + self.instance._listMethods()
291 # if the instance has a _dispatch method then we
294 elif not hasattr(self.instance, '_dispatch'):
296 methods + list_public_methods(self.instance)
322 elif self.instance is not None:
323 # Instance can implement _methodHelp to return help for a method
324 if hasattr(self.instance, '_methodHelp'):
325 return self.instance._methodHelp(method_name)
326 # if the instance has a _dispatch method then we
328 elif not hasattr(self.instance, '_dispatch'):
331 self.instance,
383 exists then the call is forwarded to the registered instance,
386 If the registered instance has a _dispatch method then that
389 e.g. instance._dispatch('add',(2,3))
391 If the registered instance does not have a _dispatch method
392 then the instance will be searched to find a matching method
404 if self.instance is not None:
406 if hasattr(self.instance, '_dispatch'):
407 return self.instance._dispatch(method, params)
409 # call instance method directly
412 self.instance,
573 Simple XML-RPC server that allows functions and a single instance
575 attempts to dispatch XML-RPC calls to the functions or instance