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

Class CommunicationClientThreaded

CommClientMixIn --+
                  |
                 CommunicationClientThreaded


The thread safe CommunicationClient. It uses several CommunicationClient to manage threading
Method Summary
  __init__(self, serv_addr, path, local_server, poolSize, socket_error_handler, compress, usingssl)
Create the threaded client.
  __del__(self)
  __getstate__(self)
To pickle functions
  close(self)
  getconn(self)
Get a communication object
  putconn(self, conn)
Return a communication Object
    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, poolSize=0, socket_error_handler=<function default_socket_error_handler at 0xb794517c>, compress=False, usingssl=False)
(Constructor)

Create the threaded client. |serv_addr| The server address (host,port). |path| The path where is listening the remote host, it has the protocol using query_string '?' notation. |poolSize| The maximum size of the pool of CommunicationClient objects |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 socket error handler. |compress| If True it uses gzip compression to content |usingssl| If True it uses the https protocol to perform connections

__getstate__(self)

To pickle functions

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