Simple Python Remote Objects Implements Simple Remote Objects
(attributes and methods).
Provides the complete suite: server and client services, and
RemoteObject wrappers to objects.
Implement new formats are quite simple. Just create a class or module
with the methods or functions loads and dumps and register your interface
with the |registerFormat| function. Thread safe operation is
responsibility of the new add-on.
Important Note: Since SPyRO |Server| is multithreaded, but
|CommunicationCliente| had synchronous protocol, it will not be able to
manage many request (every action over a object is a request) on the same
connection. It is necessary use a |Client| object peer concurrent thread,
in the best case, may be one or two are necessary or use |TClient| (uses
a pool of |Client|'s transparentely).
|
getrequest()
Returns the spyro's request dictionary that rules the current
thread or spyro request. |
source code
|
|
|
|
|
|
|
|
|
defaultoverture(httpreq,
environment)
By default pickle is disabled, to enable you must overload
'overture' or set to None |
source code
|
|
|
newRequest(objname,
attrname,
reqtype,
auth) |
source code
|
|
|
newRequestSet(objname,
attrname,
value,
local_server,
auth)
Creates a new Request for a |setattr| operation, to set the
attrname to value |
source code
|
|
|
newRequestGet(objname,
attrname,
rettype,
auth)
Creates a new Request for a |getattr| operation |
source code
|
|
|
newRequestDel(objname,
auth)
Creates a new Request for a DEL object operation |
source code
|
|
|
newRequestBye()
Creates a new Request for a BYE object operation |
source code
|
|
|
newRequestCall(objname,
attrname,
args,
kwargs,
rettype,
local_server,
auth,
extra)
A SPyRO request, call mode |objname| Object name |attrname| The
methodname |args| Positional arguments, tuple |kwargs| Keyword
arguments, dictionary |rettype| The return type, SendByReference or
SendByValue |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. |
source code
|
|
|
ObjectWrapper_GuessType(xobject,
xserver)
Function to wrap object guessing the more convenient type to send
(send by reference or by value) |
source code
|
|
|
ObjectWrapper_ByReference(xobject,
xserver,
xauthority=None)
Wrap objects to send objects to Reference |
source code
|
|
|
ObjectWrapper_ByValue(xobject)
Wrap objects to send objects to Reference |
source code
|
|
|
|
|
|
|
|
|
newResponse(errcode,
retvalue,
rettype)
Create and returns a server side response from the arguments |
source code
|
|
|
default_socket_error_handler(comm,
_socket,
addr,
error)
The default, fool, error handler in Client connections |
source code
|
|
|
getobject(address,
location,
name,
local_server=None,
poolSize=0)
Can be used as a shortcut when only we need one object in
address |
source code
|
|
|
getconn(remoteobject)
Return the connection of the remote object |
source code
|
|
|
getobjname(remoteobject)
Returns the name of the object |
source code
|
|