Package SPyRO :: Module formats :: Class XMLRPCFormat
[show private | hide private]
[frames | no frames]

Class XMLRPCFormat

SPyRO_Format --+
               |
              XMLRPCFormat

Known Subclasses:
XMLRPCFormatLegacy

XMLRPC Format,

SPyRO Clients can use the transparent mode.
Non-SPyRO clients must send request to any of the following functions

==> SPyRO_execute(options)
Note: SPyRO_execute has an alias called 'execute' with the same arguments
Execute a dictionary (xmlrpc struct) with all the information to perform
a remote operation. The possible arguments depends of the type of the
request, (See the SPyRO's Request class).
   The basic arguments or fields are:
    |objname| The object name (ID in the server)
    |attrname| The name of the requested attribute
    |reqtype| The type of the request. It can be 'BYE', 'GET', 'SET', 'DEL',
    CALL'
    |auth| The authentication object to the request

   Advanced arguments:
    |local_server| If Request to call a remote method and exists port we call
    the method with the pass the arguments by reference the server receives
    the name or id in the remote peer (the caller) and a port to connect.
    The IP address is obtained by the socket
    |auth| The authentication object
    |extra| Additional info to append to message, for example routed calls

   When calling methods:
   
    |args| Positional arguments, tuple
    |kwargs| Keyword arguments, dictionary


Other specific functions are:
==> getAttr(object_name, attribute_name)
Retrieves the value of the attribute |attribute_name| from the object
|object_name|

==> setAttr(object_name, attribute_name, new_value)
Set the value to the attribute |attribute_name| of the object |object_name|

==> callMethod(object_name, method_name, positional_args, keyword_args, options)
Call remote methods
|object_name| The name of the object
|method_name| The name of the method
|positional_args| The position arguments (an array or list)
|keyword_args| The named arguments (a struct or dictionary)
|options| Aditional arguments (see 'SPyRO_execute'

Method Summary
  __init__(self, encoding)
  dump_error(self, msg, comm)
  dump_result(self, msg, comm)
  load_request(self, msg, peerconn)
  _dumps(self, msg, comm)
Dumps a msg.
  _loads(self, msg, comm)
Loads a msg.
    Inherited from SPyRO_Format
  contenttype(self)
Returns the content type to send menssages
  dump_callMethod(self, msg, commclient)
Creates the call method
  dump_control(self, msg, commclient)
Creates a DEL|BYE request or any other request at low level
  dump_getAttr(self, msg, commclient)
Creates the get attribute message
  dump_setAttr(self, msg, commclient)
Creates the set attribute message
  load_result(self, msg, commclient)

Method Details

_dumps(self, msg, comm)

Dumps a msg. Its called for every dump_* if the dump_* method is not overloaded
Overrides:
SPyRO.formats.SPyRO_Format._dumps (inherited documentation)

_loads(self, msg, comm)

Loads a msg. Its called for every load_* if the load_* method is not overloaded
Overrides:
SPyRO.formats.SPyRO_Format._loads (inherited documentation)

Generated by Epydoc 2.1 on Sat Oct 14 11:50:52 2006 http://epydoc.sf.net