t.s.p.RemoteReference(Serializable, styles.Ephemeral) : class documentation

Part of twisted.spread.pb View Source View In Hierarchy

Known subclasses: twisted.words.service.AvatarReference, twisted.words.service.PBGroupReference, twisted.words.service.PBMindReference

Implements interfaces: twisted.spread.interfaces.IUnjellyable

A translucent reference to a remote object.

I may be a reference to a flavors.ViewPoint, a flavors.Referenceable, or an IPerspective implementor (e.g., pb.Avatar). From the client's perspective, it is not possible to tell which except by convention.

I am a "translucent" reference because although no additional bookkeeping overhead is given to the application programmer for manipulating a reference, return values are asynchronous.

See also twisted.internet.defer.

Instance Variable broker The broker I am obtained through. (type: Broker)
Method __init__ (internal) Initialize me with a broker and a locally-unique ID.
Method notifyOnDisconnect Register a callback to be called if our broker gets disconnected.
Method dontNotifyOnDisconnect Remove a callback that was registered with notifyOnDisconnect.
Method jellyFor If I am being sent back to where I came from, serialize as a local backreference.
Method unjellyFor Unjelly myself for the jellier.
Method callRemote Asynchronously invoke a remote method.
Method remoteMethod Get a RemoteMethod for this key.
Method __cmp__ Compare me [to another RemoteReference].
Method __hash__ Hash me.
Method __del__ Do distributed reference counting on finalization.
Method _disconnected Called if we are disconnected and have callbacks registered.

Inherited from Ephemeral:

Method __getstate__ Undocumented
Method __setstate__ Undocumented
broker =
The broker I am obtained through. (type: Broker)
def __init__(self, perspective, broker, luid, doRefCount): (source)
(internal) Initialize me with a broker and a locally-unique ID.

The ID is unique only to the particular Perspective Broker instance.

def notifyOnDisconnect(self, callback): (source)
Register a callback to be called if our broker gets disconnected.

This callback will be called with one argument, this instance.

def dontNotifyOnDisconnect(self, callback): (source)
Remove a callback that was registered with notifyOnDisconnect.
def _disconnected(self): (source)
Called if we are disconnected and have callbacks registered.
def jellyFor(self, jellier): (source)
If I am being sent back to where I came from, serialize as a local backreference.
def unjellyFor(self, unjellier, unjellyList): (source)
Unjelly myself for the jellier.
ParametersjellierA stateful object which exists for the lifetime of a single call to unjelly.
jellyListThe list which represents the jellied state of the object to be unjellied.
ReturnsThe object which results from unjellying.
def callRemote(self, _name, *args, **kw): (source)
Asynchronously invoke a remote method.
Parameters_namethe name of the remote method to invoke (type: str)
argsarguments to serialize for the remote function
kwkeyword arguments to serialize for the remote function.
Returnsa Deferred which will be fired when the result of this remote call is received. (type: twisted.internet.defer.Deferred)
def remoteMethod(self, key): (source)
Get a RemoteMethod for this key.
def __cmp__(self, other): (source)
Compare me [to another RemoteReference].
def __hash__(self): (source)
Hash me.
def __del__(self): (source)
Do distributed reference counting on finalization.
API Documentation for Twisted, generated by pydoctor at 2014-05-12 18:27:00.