class documentation

class RemoteReference(Serializable, styles.Ephemeral): (source)

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

Implements interfaces: twisted.spread.interfaces.IUnjellyable

View In Hierarchy

A translucent reference to a remote object.

I may be a reference to a flavors.ViewPoint, a flavors.Referenceable, or an IPerspective implementer (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.

Method __cmp__
Method __del__ Do distributed reference counting on finalization.
Method __hash__ Hash me.
Method __init__ (internal) Initialize me with a broker and a locally-unique ID.
Method call​Remote Asynchronously invoke a remote method.
Method dont​Notify​On​Disconnect Remove a callback that was registered with notifyOnDisconnect.
Method jelly​For If I am being sent back to where I came from, serialize as a local backreference.
Method notify​On​Disconnect Register a callback to be called if our broker gets disconnected.
Method remote​Method
Method unjelly​For Unjelly myself for the jellier.
Instance Variable broker The broker I am obtained through.
Instance Variable disconnect​Callbacks Undocumented
Instance Variable do​Ref​Count Undocumented
Instance Variable luid Undocumented
Instance Variable perspective Undocumented
Method _disconnected Called if we are disconnected and have callbacks registered.

Inherited from Serializable:

Method process​Unique​ID Return an ID which uniquely represents this object for this process.

Inherited from Jellyable (via Serializable):

Method get​State​For Undocumented

Inherited from Ephemeral:

Method __getstate__ Undocumented
Method __reduce__ Serialize any subclass of Ephemeral in a way which replaces it with Ephemeral itself.
Method __setstate__ Undocumented
Instance Variable __class__ Undocumented
def __cmp__(self, other): (source)
Parameters
otheranother RemoteReference to compare me to.
def __del__(self): (source)
Do distributed reference counting on finalization.
def __hash__(self): (source)
Hash me.
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 callRemote(self, _name, *args, **kw): (source)
Asynchronously invoke a remote method.
Parameters
_name:strthe name of the remote method to invoke
*argsarguments to serialize for the remote function
**kwkeyword arguments to serialize for the remote function.
Returns
twisted.internet.defer.Deferreda Deferred which will be fired when the result of this remote call is received.
def dontNotifyOnDisconnect(self, callback): (source)
Remove a callback that was registered with notifyOnDisconnect.
Parameters
callbacka callable
def jellyFor(self, jellier): (source)
If I am being sent back to where I came from, serialize as a local backreference.
def notifyOnDisconnect(self, callback): (source)
Register a callback to be called if our broker gets disconnected.
Parameters
callbacka callable which will be called with one argument, this instance.
def remoteMethod(self, key): (source)
Parameters
keyThe key.
Returns
A RemoteMethod for this key.
def unjellyFor(self, unjellier, unjellyList): (source)
Unjelly myself for the jellier.
Parameters
unjellierUndocumented
unjelly​ListUndocumented
jellierA stateful object which exists for the lifetime of a single call to unjelly.
jelly​ListThe list which represents the jellied state of the object to be unjellied.
Returns
The object which results from unjellying.
broker: Broker = (source)
The broker I am obtained through.
disconnectCallbacks = (source)

Undocumented

doRefCount = (source)

Undocumented

luid = (source)

Undocumented

perspective = (source)

Undocumented

def _disconnected(self): (source)
Called if we are disconnected and have callbacks registered.