class twisted.spread.pb.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
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
.
Instance Variable | broker | The broker I am obtained through. |
Method | __init__ | (internal) Initialize me with a broker and a locally-unique ID. |
Instance Variable | luid | Undocumented |
Instance Variable | doRefCount | Undocumented |
Instance Variable | perspective | Undocumented |
Instance Variable | disconnectCallbacks | Undocumented |
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 | |
Method | __cmp__ | |
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 Serializable:
Method | processUniqueID | Return an ID which uniquely represents this object for this process. |
Inherited from Jellyable (via Serializable):
Method | getStateFor | Undocumented |
Inherited from Ephemeral:
Method | __reduce__ | Serialize any subclass of Ephemeral in a way which replaces it with Ephemeral itself. |
Method | __getstate__ | Undocumented |
Method | __setstate__ | Undocumented |
Instance Variable | __class__ | Undocumented |
(internal) Initialize me with a broker and a locally-unique ID.
The ID is unique only to the particular Perspective Broker instance.
Register a callback to be called if our broker gets disconnected.
Parameters | callback | a callable which will be called with one argument, this instance. |
Remove a callback that was registered with notifyOnDisconnect.
Parameters | callback | a callable |
If I am being sent back to where I came from, serialize as a local backreference.
Unjelly myself for the jellier.
Parameters | unjellier | Undocumented |
unjellyList | Undocumented | |
jellier | A stateful object which exists for the lifetime of a single call to unjelly . | |
jellyList | The list which represents the jellied state of the object to be unjellied. | |
Returns | The object which results from unjellying. |
Asynchronously invoke a remote method.
Parameters | _name | the name of the remote method to invoke (type: str ) |
args | arguments to serialize for the remote function | |
kw | keyword arguments to serialize for the remote function. | |
Returns | a Deferred which will be fired when the result of this remote call is received. (type: twisted.internet.defer.Deferred ) |