Package twisted :: Package spread :: Module pb :: Class RemoteReference |
[show private | hide private]
[frames | no frames]

## Class RemoteReference

    Jellyable --+
                |
     Serializable --+
                    |
        Ephemeral --+
                    |
                   RemoteReference

This is a translucent reference to a remote object.

I may be a reference to a `flavors.ViewPoint`, a `flavors.Referenceable`, or a `Perspective`. 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 Summary
| ``__init__`(self, perspective, broker, luid, doRefCount)` (internal) Initialize me with a broker and a locally-unique ID.
| ``__cmp__`(self, other)` Compare me [to another `RemoteReference`].
| ``__del__`(self)` Do distributed reference counting on finalization.
| `__getstate__(self)` (inherited from `Ephemeral`)
| ``__hash__`(self)` Hash me.
| `__setstate__(self, state)` (inherited from `Ephemeral`)
`twisted.internet.defer.Deferred` | ``callRemote`(self, name, *args, **kw)` Asynchronously invoke a remote method.
| ``dontNotifyOnDisconnect`(self, callback)` Remove a callback that was registered with notifyOnDisconnect.
| `getStateFor(self, jellier)` (inherited from `Jellyable`)
| ``jellyFor`(self, jellier)` If I am being sent back to where I came from, serialize as a local backreference.
| ``notifyOnDisconnect`(self, callback)` Register a callback to be called if our broker gets disconnected.
| ``processUniqueID`(self)` Return an ID which uniquely represents this object for this process. (inherited from `Serializable`)
| ``remoteMethod`(self, key)` Get a `RemoteMethod`for this key.
| `unjellyFor(self, unjellier, unjellyList)`
| ``_disconnected`(self)` Called if we are disconnected and have callbacks registered.

Instance Variable Summary
`Broker` | `broker` - The broker I am obtained through.

Method Details

### __init__(self, perspective, broker, luid, doRefCount) (Constructor) (internal) Initialize me with a broker and a locally-unique ID. The ID is unique only to the particular Perspective Broker instance.

### __cmp__(self, other) (Comparison operator) Compare me [to another `RemoteReference`].

### __del__(self) (Destructor) Do distributed reference counting on finalization.

### __hash__(self) (Hashing function) Hash me.

### callRemote(self, name, *args, **kw) Asynchronously invoke a remote method. Parameters: `name` - the name of the remote method to invoke (type=`string`) `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`)

### dontNotifyOnDisconnect(self, callback) Remove a callback that was registered with notifyOnDisconnect.

### jellyFor(self, jellier) If I am being sent back to where I came from, serialize as a local backreference.

### notifyOnDisconnect(self, callback) Register a callback to be called if our broker gets disconnected. This callback will be called with one argument, this instance.

### remoteMethod(self, key) Get a `RemoteMethod` for this key.

### _disconnected(self) Called if we are disconnected and have callbacks registered.

Instance Variable Details

### broker The broker I am obtained through. Type: `Broker`

Generated by Epydoc 1.1 on Thu May 8 13:19:03 2003 | http://epydoc.sf.net