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

Class CommunicationClient

    CommClientMixIn --+    
                      |    
CommunicationClientBase --+
                          |
                         CommunicationClient


A Client to CommunicationServer. Represents a communication channel with the server
Method Summary
  __init__(self, serv_addr, path, local_server, socket_error_handler, compress, usingssl)
Initialize client.
  __getstate__(self)
To pickle functions
  getconn(self)
Get a communication object
  putconn(self, conn)
Return a communication Object
    Inherited from CommunicationClientBase
  __del__(self)
called for the garbage collection system.
  close(self)
Close the client
    Inherited from CommClientMixIn
  __getitem__(self, name)
Get a local representation of the remote object with ID |name|.
  byeRequest(self)
Send a bye request
  callMethod(self, objname, attrname, args, kwargs, rettype, local_server, auth, extra)
Call a method.
  callMethodGuess(self, objname, attrname, args, kwargs, rettype, local_server, auth, extra)
Call a method, Guessing the best type to send arguments |objname| The object's name that has the method |attrname| The name of the object |args| The positional arguments of the call |kwargs| The keyword arguments of the call |rettype| The return type of the result |local_server| the local server to send arguments by reference |auth| The authorizing information to access the object |extra| Additional information to be added to the message
  delObject(self, objname, auth)
Get an attribute |attrname| of the object |objname| with the method to send the object |rettype|, the default is SendByValue.
  get(self, name, auth)
Get a local representation of the remote object with ID |name|.
  get_request_local_server(self, local_server)
Return a local_server tuple to make the request
  getAttr(self, objname, attrname, rettype, auth)
Get an attribute |attrname| of the object |objname| with the method to send the object |rettype|, the default is SendByValue |auth| The authorizing information to access the object
  getobj(self, name, auth)
Get a local representation of the remote object with ID |name|
  handleRequest(self, conn, request, send_method)
Common code to getAttr, setAttr and callMethod
  setAttr(self, objname, attrname, value, sendtype, local_server, auth)
Set the attribute |attrname| to |value| in the object |objname|.

Method Details

__init__(self, serv_addr, path, local_server=None, socket_error_handler=<function default_socket_error_handler at 0xb794517c>, compress=False, usingssl=False)
(Constructor)

Initialize client.
|serv_addr| The remote server address (host,port)
|path| Location of the server (to apache or another general purpose
       http servers). It describes the encoder protocol using the
       query_string '?' notation.
|local_server| If is set to a CommunicationServer, when a method is
       called the arguments are passed by reference and the remote
       server
       will try to connect to this server (port and location).
       The IP address is the used to contact the remote server.
|socket_error_handler| The error handler, called when an exception
    is arised in the connection, parsing, or interpreting messages.
|compress| Compress the messages between peers
|usingssl| If True, every connection is performed with the https protocol
Overrides:
SPyRO.SPyRO.CommunicationClientBase.__init__ (inherited documentation)

__getstate__(self)

To pickle functions
Overrides:
SPyRO.SPyRO.CommunicationClientBase.__getstate__

getconn(self)

Get a communication object
Overrides:
SPyRO.SPyRO.CommClientMixIn.getconn (inherited documentation)

putconn(self, conn)

Return a communication Object
Overrides:
SPyRO.SPyRO.CommClientMixIn.putconn (inherited documentation)

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