Package rosgraph :: Module xmlrpc :: Class XmlRpcNode
[frames] | no frames]

Class XmlRpcNode

source code

object --+
         |
        XmlRpcNode

Generic XML-RPC node. Handles the additional complexity of binding an XML-RPC server to an arbitrary port. XmlRpcNode is initialized when the uri field has a value.

Instance Methods
 
__init__(self, port=0, rpc_handler=None, on_run_error=None)
XML RPC Node constructor :param port: port to use for starting XML-RPC API.
source code
 
shutdown(self, reason)
Terminate i/o connections for this server.
source code
 
start(self)
Initiate a thread to run the XML RPC server.
source code
 
set_uri(self, uri)
Sets the XML-RPC URI.
source code
 
run(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, port=0, rpc_handler=None, on_run_error=None)
(Constructor)

source code 

XML RPC Node constructor
:param port: port to use for starting XML-RPC API. Set to 0 or omit to bind to any available port, ``int``
:param rpc_handler: XML-RPC API handler for node, `XmlRpcHandler`
:param on_run_error: function to invoke if server.run() throws
  Exception. Server always terminates if run() throws, but this
  enables cleanup routines to be invoked if server goes down, as
  well as include additional debugging. ``fn(Exception)``

Overrides: object.__init__

shutdown(self, reason)

source code 

Terminate i/o connections for this server.

:param reason: human-readable debug string, ``str``

start(self)

source code 

Initiate a thread to run the XML RPC server. Uses thread.start_new_thread.

set_uri(self, uri)

source code 

Sets the XML-RPC URI. Defined as a separate method as a hood for subclasses to bootstrap initialization. Should not be called externally.

:param uri: XMLRPC URI, ``str``