1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
"DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<title>twisted.spread.pb.RemoteReference</title>
7
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
9
<body bgcolor="white" text="black" link="blue" vlink="#204080"
12
<!-- =========== START OF NAVBAR =========== -->
13
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
15
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
16
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
17
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
18
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
19
<th class="navbar" align="right" width="100%">
20
<table border="0" cellpadding="0" cellspacing="0">
21
<tr><th class="navbar" align="center">
23
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
24
</p></th></tr></table>
28
<table width="100%" cellpadding="0" cellspacing="0">
31
<font size="-1"><b class="breadcrumbs">
32
<a href="twisted.html">Package twisted</a> ::
33
<a href="twisted.spread.html">Package spread</a> ::
34
<a href="twisted.spread.pb.html">Module pb</a> ::
35
Class RemoteReference
38
<td><table cellpadding="0" cellspacing="0">
39
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="twisted.spread.pb.RemoteReference.html" target="_top">no frames</a>]</font></td></tr>
43
<!-- =========== START OF CLASS DESCRIPTION =========== -->
44
<h2 class="class">Class RemoteReference</h2>
46
<pre class="base-tree">
47
<a href="twisted.persisted.styles.Ephemeral.html"><code>Ephemeral</code></a> --+
49
<a href="twisted.spread.jelly.Jellyable.html"><code>Jellyable</code></a> --+ |
51
<a href="twisted.spread.flavors.Serializable.html"><code>Serializable</code></a> --+
53
<b>RemoteReference</b>
58
<p>This is a translucent reference to a remote object.</p>
59
<p>I may be a reference to a <a
60
href="twisted.spread.flavors.ViewPoint.html"
61
class="link"><code>flavors.ViewPoint</code></a>, a <a
62
href="twisted.spread.flavors.Referenceable.html"
63
class="link"><code>flavors.Referenceable</code></a>, or an <a
64
href="twisted.spread.pb.IPerspective.html"
65
class="link"><code>IPerspective</code></a> implementor (e.g., pb.Avatar).
66
From the client's perspective, it is not possible to tell which except by
68
<p>I am a "translucent" reference because although no
69
additional bookkeeping overhead is given to the application programmer
70
for manipulating a reference, return values are asynchronous.</p>
71
See also <a href="twisted.internet.defer.html"
72
class="link"><code>twisted.internet.defer</code></a>.
76
<!-- =========== START OF METHOD SUMMARY =========== -->
77
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
78
<tr bgcolor="#70b0f0" class="summary">
79
<th colspan="2">Method Summary</th></tr>
80
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
81
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
82
<span class=summary-sig-arg>perspective</span>,
83
<span class=summary-sig-arg>broker</span>,
84
<span class=summary-sig-arg>luid</span>,
85
<span class=summary-sig-arg>doRefCount</span>)</span></code>
87
(internal) Initialize me with a broker and a locally-unique ID.</td></tr>
88
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
89
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#__cmp__" class="summary-sig-name"><code>__cmp__</code></a>(<span class=summary-sig-arg>self</span>,
90
<span class=summary-sig-arg>other</span>)</span></code>
92
Compare me [to another <a
93
href="twisted.spread.pb.RemoteReference.html"
94
class="link"><code>RemoteReference</code></a>].</td></tr>
95
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
96
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#__del__" class="summary-sig-name"><code>__del__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
98
Do distributed reference counting on finalization.</td></tr>
99
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
100
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#__hash__" class="summary-sig-name"><code>__hash__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
103
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
104
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#_disconnected" class="summary-sig-name"><code>_disconnected</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
106
Called if we are disconnected and have callbacks registered.</td></tr>
107
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="twisted.internet.defer.Deferred.html"
108
class="link"><code>twisted.internet.defer.Deferred</code></a>
110
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#callRemote" class="summary-sig-name"><code>callRemote</code></a>(<span class=summary-sig-arg>self</span>,
111
<span class=summary-sig-arg>_name</span>,
112
<span class="summary-sig-vararg">*args</span>,
113
<span class="summary-sig-kwarg">**kw</span>)</span></code>
115
Asynchronously invoke a remote method.</td></tr>
116
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
117
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#dontNotifyOnDisconnect" class="summary-sig-name"><code>dontNotifyOnDisconnect</code></a>(<span class=summary-sig-arg>self</span>,
118
<span class=summary-sig-arg>callback</span>)</span></code>
120
Remove a callback that was registered with notifyOnDisconnect.</td></tr>
121
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
122
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#jellyFor" class="summary-sig-name"><code>jellyFor</code></a>(<span class=summary-sig-arg>self</span>,
123
<span class=summary-sig-arg>jellier</span>)</span></code>
125
If I am being sent back to where I came from, serialize as a local
126
backreference.</td></tr>
127
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
128
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#notifyOnDisconnect" class="summary-sig-name"><code>notifyOnDisconnect</code></a>(<span class=summary-sig-arg>self</span>,
129
<span class=summary-sig-arg>callback</span>)</span></code>
131
Register a callback to be called if our broker gets disconnected.</td></tr>
132
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
133
<td><code><span class="summary-sig"><a href="twisted.spread.pb.RemoteReference.html#remoteMethod" class="summary-sig-name"><code>remoteMethod</code></a>(<span class=summary-sig-arg>self</span>,
134
<span class=summary-sig-arg>key</span>)</span></code>
136
Get a <a href="twisted.spread.pb.RemoteMethod.html"
137
class="link"><code>RemoteMethod</code></a> for this key.</td></tr>
138
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
139
<td><code><a name="unjellyFor"></a><span class="summary-sig"><span class="summary-sig-name">unjellyFor</span>(<span class=summary-sig-arg>self</span>,
140
<span class=summary-sig-arg>unjellier</span>,
141
<span class=summary-sig-arg>unjellyList</span>)</span></code>
143
<tr bgcolor="#e8f0f8" class="group">
144
<th colspan="2"> Inherited from Serializable</th></tr>
145
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
146
<td><code><span class="summary-sig"><a href="twisted.spread.flavors.Serializable.html#processUniqueID" class="summary-sig-name"><code>processUniqueID</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
148
Return an ID which uniquely represents this object for this
150
<tr bgcolor="#e8f0f8" class="group">
151
<th colspan="2"> Inherited from Jellyable</th></tr>
152
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
153
<td><code><span class="summary-sig"><a href="twisted.spread.jelly.Jellyable.html#getStateFor" class="summary-sig-name"><code>getStateFor</code></a>(<span class=summary-sig-arg>self</span>,
154
<span class=summary-sig-arg>jellier</span>)</span></code>
156
<tr bgcolor="#e8f0f8" class="group">
157
<th colspan="2"> Inherited from Ephemeral</th></tr>
158
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
159
<td><code><span class="summary-sig"><a href="twisted.persisted.styles.Ephemeral.html#__getstate__" class="summary-sig-name"><code>__getstate__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
161
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
162
<td><code><span class="summary-sig"><a href="twisted.persisted.styles.Ephemeral.html#__setstate__" class="summary-sig-name"><code>__setstate__</code></a>(<span class=summary-sig-arg>self</span>,
163
<span class=summary-sig-arg>state</span>)</span></code>
168
<!-- =========== START OF INSTANCE VARIABLE SUMMARY =========== -->
169
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
170
<tr bgcolor="#70b0f0" class="summary">
171
<th colspan="2">Instance Variable Summary</th></tr>
172
<tr><td align="right" valign="top" width="15%"><font size="-1"><a href="twisted.spread.pb.Broker.html"
173
class="link"><code>Broker</code></a></font></td>
174
<td><b><a href="twisted.spread.pb.RemoteReference.html#broker"><code>broker</code></a></b>: The broker I am obtained through.</td></tr>
178
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
179
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
180
<tr bgcolor="#70b0f0" class="summary">
181
<th colspan="2">Class Variable Summary</th></tr>
182
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>tuple</code></font></td>
183
<td><b><a href="twisted.spread.pb.RemoteReference.html#__implements__"><code>__implements__</code></a></b> = <span title="(<class twisted.spread.interfaces.IUnjellyable at 0x84a65dc>,)"><code>(<class twisted.spread.interfaces.IUnje<span class="variable-ellipsis">...</span></code>
188
<!-- =========== START OF METHOD DETAILS =========== -->
189
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
190
<tr bgcolor="#70b0f0" class="details">
191
<th colspan="2">Method Details</th></tr>
194
<a name="__init__"></a>
195
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
196
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
197
<span class=sig-arg>perspective</span>,
198
<span class=sig-arg>broker</span>,
199
<span class=sig-arg>luid</span>,
200
<span class=sig-arg>doRefCount</span>)</span>
201
<br /><i>(Constructor)</i>
203
<p>(internal) Initialize me with a broker and a locally-unique ID.</p>
204
The ID is unique only to the particular Perspective Broker
210
<a name="__cmp__"></a>
211
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
212
<h3><span class="sig"><span class="sig-name">__cmp__</span>(<span class=sig-arg>self</span>,
213
<span class=sig-arg>other</span>)</span>
214
<br /><i>(Comparison operator)</i>
216
Compare me [to another <a
217
href="twisted.spread.pb.RemoteReference.html"
218
class="link"><code>RemoteReference</code></a>].
223
<a name="__del__"></a>
224
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
225
<h3><span class="sig"><span class="sig-name">__del__</span>(<span class=sig-arg>self</span>)</span>
226
<br /><i>(Destructor)</i>
228
Do distributed reference counting on finalization.
233
<a name="__hash__"></a>
234
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
235
<h3><span class="sig"><span class="sig-name">__hash__</span>(<span class=sig-arg>self</span>)</span>
236
<br /><i>(Hashing function)</i>
243
<a name="_disconnected"></a>
244
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
245
<h3><span class="sig"><span class="sig-name">_disconnected</span>(<span class=sig-arg>self</span>)</span>
247
Called if we are disconnected and have callbacks registered.
252
<a name="callRemote"></a>
253
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
254
<h3><span class="sig"><span class="sig-name">callRemote</span>(<span class=sig-arg>self</span>,
255
<span class=sig-arg>_name</span>,
256
<span class="sig-vararg">*args</span>,
257
<span class="sig-kwarg">**kw</span>)</span>
259
Asynchronously invoke a remote method.
261
<dl><dt><b>Parameters:</b></dt>
262
<dd><code><b>_name</b></code> -
263
the name of the remote method to invoke
264
<br /><i>
265
(type=<code>string</code>)</i>
266
<dd><code><b>args</b></code> -
267
arguments to serialize for the remote function
268
<dd><code><b>kw</b></code> -
269
keyword arguments to serialize for the remote function.
272
<dl><dt><b>Returns:</b></dt>
274
a Deferred which will be fired when the result of this remote
276
<br /><i>
277
(type=<a href="twisted.internet.defer.Deferred.html"
278
class="link"><code>twisted.internet.defer.Deferred</code></a>)</i>
284
<a name="dontNotifyOnDisconnect"></a>
285
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
286
<h3><span class="sig"><span class="sig-name">dontNotifyOnDisconnect</span>(<span class=sig-arg>self</span>,
287
<span class=sig-arg>callback</span>)</span>
289
Remove a callback that was registered with notifyOnDisconnect.
294
<a name="jellyFor"></a>
295
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
296
<h3><span class="sig"><span class="sig-name">jellyFor</span>(<span class=sig-arg>self</span>,
297
<span class=sig-arg>jellier</span>)</span>
299
If I am being sent back to where I came from, serialize as a local
302
<dl><dt><b>Overrides:</b></dt>
303
<dd><a href="twisted.spread.jelly.Jellyable.html#jellyFor"><code>twisted.spread.jelly.Jellyable.jellyFor</code></a></dd>
308
<a name="notifyOnDisconnect"></a>
309
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
310
<h3><span class="sig"><span class="sig-name">notifyOnDisconnect</span>(<span class=sig-arg>self</span>,
311
<span class=sig-arg>callback</span>)</span>
313
<p>Register a callback to be called if our broker gets
315
This callback will be called with one argument, this instance.
320
<a name="remoteMethod"></a>
321
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
322
<h3><span class="sig"><span class="sig-name">remoteMethod</span>(<span class=sig-arg>self</span>,
323
<span class=sig-arg>key</span>)</span>
325
Get a <a href="twisted.spread.pb.RemoteMethod.html"
326
class="link"><code>RemoteMethod</code></a> for this key.
333
<!-- =========== START OF INSTANCE VARIABLE DETAILS =========== -->
334
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
335
<tr bgcolor="#70b0f0" class="details">
336
<th colspan="2">Instance Variable Details</th></tr>
338
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
339
<a name="broker"></a>
341
The broker I am obtained through.
346
<dt><b>Type:</b></dt>
348
<a href="twisted.spread.pb.Broker.html"
349
class="link"><code>Broker</code></a>
354
</dl></td></tr></table>
358
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
359
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
360
<tr bgcolor="#70b0f0" class="details">
361
<th colspan="2">Class Variable Details</th></tr>
363
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
364
<a name="__implements__"></a>
365
<h3>__implements__</h3>
370
<dt><b>Type:</b></dt>
375
<span title="(<class twisted.spread.interfaces.IUnjellyable at 0x84a65dc>,)"> <dt><b>Value:</b></dt>
377
<pre class="variable">
378
(<class twisted.spread.interfaces.IUnjellyable at 0x84a65dc>,) </pre>
379
</td></tr></table></dd>
382
</dl></td></tr></table>
386
<!-- =========== START OF NAVBAR =========== -->
387
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
389
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
390
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
391
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
392
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
393
<th class="navbar" align="right" width="100%">
394
<table border="0" cellpadding="0" cellspacing="0">
395
<tr><th class="navbar" align="center">
397
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
398
</p></th></tr></table>
403
<table border="0" cellpadding="0" cellspacing="0" width="100%">
405
<td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:07:45 2004</font></td>
406
<td align="right"><a href="http://epydoc.sourceforge.net"
407
><font size="-2">http://epydoc.sf.net</font></a></td>