marilyn-rpc 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +39 -4
- data/examples/async/client.rb +0 -5
- data/examples/authentication/client.rb +18 -0
- data/examples/authentication/server.rb +30 -0
- data/lib/marilyn-rpc.rb +1 -1
- data/lib/marilyn-rpc/client.rb +21 -3
- data/lib/marilyn-rpc/error.rb +13 -0
- data/lib/marilyn-rpc/mails.rb +3 -3
- data/lib/marilyn-rpc/server.rb +6 -11
- data/lib/marilyn-rpc/service.rb +86 -11
- data/lib/marilyn-rpc/service_cache.rb +44 -23
- data/lib/marilyn-rpc/version.rb +1 -1
- data/spec/mails_spec.rb +2 -1
- data/spec/server_spec.rb +1 -1
- data/spec/service_cache_spec.rb +140 -0
- data/spec/service_spec.rb +56 -5
- data/spec/spec_helper.rb +5 -0
- metadata +10 -34
- data/doc/MarilynRPC.html +0 -108
- data/doc/MarilynRPC/CallRequestMail.html +0 -578
- data/doc/MarilynRPC/CallResponseMail.html +0 -418
- data/doc/MarilynRPC/Envelope.html +0 -705
- data/doc/MarilynRPC/ExceptionMail.html +0 -338
- data/doc/MarilynRPC/Gentleman.html +0 -658
- data/doc/MarilynRPC/MailFactory.html +0 -284
- data/doc/MarilynRPC/MailHelper.html +0 -489
- data/doc/MarilynRPC/NativeClient.html +0 -579
- data/doc/MarilynRPC/NativeClientProxy.html +0 -303
- data/doc/MarilynRPC/Server.html +0 -406
- data/doc/MarilynRPC/Service.html +0 -599
- data/doc/MarilynRPC/ServiceCache.html +0 -481
- data/doc/_index.html +0 -219
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -318
- data/doc/file.README.html +0 -154
- data/doc/file_list.html +0 -38
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -154
- data/doc/js/app.js +0 -203
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -16
- data/doc/method_list.html +0 -467
- data/doc/top-level-namespace.html +0 -88
- data/spec/service_cache.rb +0 -45
@@ -1,338 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>Class: MarilynRPC::ExceptionMail</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../_index.html">Index (E)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../MarilynRPC.html" title="MarilynRPC (module)">MarilynRPC</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">ExceptionMail</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Class: MarilynRPC::ExceptionMail
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
<dt class="r1">Inherits:</dt>
|
55
|
-
<dd class="r1">
|
56
|
-
<span class="inheritName">Struct</span>
|
57
|
-
|
58
|
-
<ul class="fullTree">
|
59
|
-
<li>Object</li>
|
60
|
-
|
61
|
-
<li class="next">Struct</li>
|
62
|
-
|
63
|
-
<li class="next">MarilynRPC::ExceptionMail</li>
|
64
|
-
|
65
|
-
</ul>
|
66
|
-
<a href="#" class="inheritanceTree">show all</a>
|
67
|
-
|
68
|
-
</dd>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
<dt class="r2">Includes:</dt>
|
76
|
-
<dd class="r2"><span class='object_link'><a href="MailHelper.html" title="MarilynRPC::MailHelper (module)">MailHelper</a></span></dd>
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
<dt class="r1 last">Defined in:</dt>
|
83
|
-
<dd class="r1 last">lib/marilyn-rpc/mails.rb</dd>
|
84
|
-
|
85
|
-
</dl>
|
86
|
-
<div class="clear"></div>
|
87
|
-
|
88
|
-
|
89
|
-
<h2>Constant Summary</h2>
|
90
|
-
|
91
|
-
<dl class="constants">
|
92
|
-
|
93
|
-
<dt id="TYPE-constant" class="">TYPE =
|
94
|
-
|
95
|
-
</dt>
|
96
|
-
<dd><pre class="code"><span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='MailHelper constant id'>MailHelper</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='lparen token'>(</span><span class='integer val'>3</span><span class='rparen token'>)</span>
|
97
|
-
</pre></dd>
|
98
|
-
|
99
|
-
</dl>
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
109
|
-
<ul class="summary">
|
110
|
-
|
111
|
-
<li class="public ">
|
112
|
-
<span class="summary_signature">
|
113
|
-
|
114
|
-
<a href="#exception-instance_method" title="#exception (instance method)">- (Object) <strong>exception</strong> </a>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
</span>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute exception.</p></div></span>
|
131
|
-
|
132
|
-
</li>
|
133
|
-
|
134
|
-
|
135
|
-
</ul>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<h2>
|
140
|
-
Instance Method Summary
|
141
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
142
|
-
</h2>
|
143
|
-
|
144
|
-
<ul class="summary">
|
145
|
-
|
146
|
-
<li class="public ">
|
147
|
-
<span class="summary_signature">
|
148
|
-
|
149
|
-
<a href="#decode-instance_method" title="#decode (instance method)">- (Object) <strong>decode</strong>(data) </a>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</span>
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
163
|
-
|
164
|
-
</li>
|
165
|
-
|
166
|
-
|
167
|
-
<li class="public ">
|
168
|
-
<span class="summary_signature">
|
169
|
-
|
170
|
-
<a href="#encode-instance_method" title="#encode (instance method)">- (Object) <strong>encode</strong> </a>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</span>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
184
|
-
|
185
|
-
</li>
|
186
|
-
|
187
|
-
|
188
|
-
</ul>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="MailHelper.html" title="MarilynRPC::MailHelper (module)">MailHelper</a></span></h3>
|
200
|
-
<p class="inherited"><span class='object_link'><a href="MailHelper.html#deserialize-instance_method" title="MarilynRPC::MailHelper#deserialize (method)">#deserialize</a></span>, <span class='object_link'><a href="MailHelper.html#only_data-instance_method" title="MarilynRPC::MailHelper#only_data (method)">#only_data</a></span>, <span class='object_link'><a href="MailHelper.html#serialize-instance_method" title="MarilynRPC::MailHelper#serialize (method)">#serialize</a></span>, <span class='object_link'><a href="MailHelper.html#type-class_method" title="MarilynRPC::MailHelper.type (method)">type</a></span></p>
|
201
|
-
|
202
|
-
|
203
|
-
<div id="instance_attr_details" class="attr_details">
|
204
|
-
<h2>Instance Attribute Details</h2>
|
205
|
-
|
206
|
-
|
207
|
-
<span id="exception=-instance_method"></span>
|
208
|
-
<span id="exception-instance_method"></span>
|
209
|
-
<div class="method_details first">
|
210
|
-
<p class="signature first" id="exception-instance_method">
|
211
|
-
|
212
|
-
- (<tt>Object</tt>) <strong>exception</strong>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</p><div class="docstring">
|
217
|
-
<div class="discussion">
|
218
|
-
<p>Returns the value of attribute exception</p>
|
219
|
-
|
220
|
-
</div>
|
221
|
-
</div>
|
222
|
-
<div class="tags">
|
223
|
-
<h3>Returns:</h3>
|
224
|
-
<ul class="return">
|
225
|
-
|
226
|
-
<li>
|
227
|
-
|
228
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
—
|
234
|
-
<div class='inline'><p>the current value of exception</p></div>
|
235
|
-
|
236
|
-
</li>
|
237
|
-
|
238
|
-
</ul>
|
239
|
-
|
240
|
-
</div><table class="source_code">
|
241
|
-
<tr>
|
242
|
-
<td>
|
243
|
-
<pre class="lines">
|
244
|
-
|
245
|
-
|
246
|
-
59
|
247
|
-
60
|
248
|
-
61</pre>
|
249
|
-
</td>
|
250
|
-
<td>
|
251
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 59</span>
|
252
|
-
|
253
|
-
<span class='def def kw'>def</span> <span class='exception identifier id'>exception</span>
|
254
|
-
<span class='@exception ivar id'>@exception</span>
|
255
|
-
<span class='end end kw'>end</span>
|
256
|
-
</pre>
|
257
|
-
</td>
|
258
|
-
</tr>
|
259
|
-
</table>
|
260
|
-
</div>
|
261
|
-
|
262
|
-
</div>
|
263
|
-
|
264
|
-
|
265
|
-
<div id="instance_method_details" class="method_details_list">
|
266
|
-
<h2>Instance Method Details</h2>
|
267
|
-
|
268
|
-
|
269
|
-
<div class="method_details first">
|
270
|
-
<p class="signature first" id="decode-instance_method">
|
271
|
-
|
272
|
-
- (<tt>Object</tt>) <strong>decode</strong>(data)
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
</p><table class="source_code">
|
277
|
-
<tr>
|
278
|
-
<td>
|
279
|
-
<pre class="lines">
|
280
|
-
|
281
|
-
|
282
|
-
67
|
283
|
-
68
|
284
|
-
69</pre>
|
285
|
-
</td>
|
286
|
-
<td>
|
287
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 67</span>
|
288
|
-
|
289
|
-
<span class='def def kw'>def</span> <span class='decode identifier id'>decode</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
|
290
|
-
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='exception identifier id'>exception</span> <span class='assign token'>=</span> <span class='deserialize identifier id'>deserialize</span><span class='lparen token'>(</span><span class='only_data identifier id'>only_data</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
291
|
-
<span class='end end kw'>end</span>
|
292
|
-
</pre>
|
293
|
-
</td>
|
294
|
-
</tr>
|
295
|
-
</table>
|
296
|
-
</div>
|
297
|
-
|
298
|
-
<div class="method_details ">
|
299
|
-
<p class="signature " id="encode-instance_method">
|
300
|
-
|
301
|
-
- (<tt>Object</tt>) <strong>encode</strong>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
</p><table class="source_code">
|
306
|
-
<tr>
|
307
|
-
<td>
|
308
|
-
<pre class="lines">
|
309
|
-
|
310
|
-
|
311
|
-
63
|
312
|
-
64
|
313
|
-
65</pre>
|
314
|
-
</td>
|
315
|
-
<td>
|
316
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 63</span>
|
317
|
-
|
318
|
-
<span class='def def kw'>def</span> <span class='encode identifier id'>encode</span>
|
319
|
-
<span class='TYPE constant id'>TYPE</span> <span class='plus op'>+</span> <span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='exception identifier id'>exception</span><span class='rparen token'>)</span>
|
320
|
-
<span class='end end kw'>end</span>
|
321
|
-
</pre>
|
322
|
-
</td>
|
323
|
-
</tr>
|
324
|
-
</table>
|
325
|
-
</div>
|
326
|
-
|
327
|
-
</div>
|
328
|
-
|
329
|
-
</div>
|
330
|
-
|
331
|
-
<div id="footer">
|
332
|
-
Generated on Wed Jun 8 18:26:47 2011 by
|
333
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
334
|
-
0.6.8 (ruby-1.8.7).
|
335
|
-
</div>
|
336
|
-
|
337
|
-
</body>
|
338
|
-
</html>
|
@@ -1,658 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>Class: MarilynRPC::Gentleman</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../_index.html">Index (G)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../MarilynRPC.html" title="MarilynRPC (module)">MarilynRPC</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">Gentleman</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Class: MarilynRPC::Gentleman
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
<dt class="r1">Inherits:</dt>
|
55
|
-
<dd class="r1">
|
56
|
-
<span class="inheritName">Object</span>
|
57
|
-
|
58
|
-
<ul class="fullTree">
|
59
|
-
<li>Object</li>
|
60
|
-
|
61
|
-
<li class="next">MarilynRPC::Gentleman</li>
|
62
|
-
|
63
|
-
</ul>
|
64
|
-
<a href="#" class="inheritanceTree">show all</a>
|
65
|
-
|
66
|
-
</dd>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<dt class="r2 last">Defined in:</dt>
|
77
|
-
<dd class="r2 last">lib/marilyn-rpc/gentleman.rb</dd>
|
78
|
-
|
79
|
-
</dl>
|
80
|
-
<div class="clear"></div>
|
81
|
-
|
82
|
-
<h2>Overview</h2><div class="docstring">
|
83
|
-
<div class="discussion">
|
84
|
-
<p>The gentleman is a proxy onject that should help to create async responses on the server (service) side. There are two ways to use the gentleman. See the examples.</p>
|
85
|
-
|
86
|
-
<p>The Gentleman has to be returned by the service method.</p>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
</div>
|
90
|
-
<div class="tags">
|
91
|
-
|
92
|
-
<div class="examples">
|
93
|
-
<h3>Examples:</h3>
|
94
|
-
|
95
|
-
<h4><div class='inline'><p>Use the gentleman als passed block</p></div></h4>
|
96
|
-
<pre class="example code"><span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='Gentleman constant id'>Gentleman</span><span class='dot token'>.</span><span class='proxy identifier id'>proxy</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='helper identifier id'>helper</span><span class='bitor op'>|</span>
|
97
|
-
<span class='EM constant id'>EM</span><span class='dot token'>.</span><span class='system identifier id'>system</span><span class='lparen token'>(</span><span class='string val'>'ls'</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='helper identifier id'>helper</span><span class='rparen token'>)</span>
|
98
|
-
|
99
|
-
<span class='lambda identifier id'>lambda</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='output identifier id'>output</span><span class='comma token'>,</span><span class='status identifier id'>status</span><span class='bitor op'>|</span>
|
100
|
-
<span class='output identifier id'>output</span> <span class='if if_mod kw'>if</span> <span class='status identifier id'>status</span><span class='dot token'>.</span><span class='exitstatus identifier id'>exitstatus</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
|
101
|
-
<span class='end end kw'>end</span>
|
102
|
-
<span class='end end kw'>end</span>
|
103
|
-
</pre>
|
104
|
-
|
105
|
-
<h4><div class='inline'><p>Use the gentleman for responses that are objects</p></div></h4>
|
106
|
-
<pre class="example code"><span class='conn identifier id'>conn</span> <span class='assign token'>=</span> <span class='EM constant id'>EM</span><span class='colon2 op'>::</span><span class='Protocols constant id'>Protocols</span><span class='colon2 op'>::</span><span class='HttpClient2 constant id'>HttpClient2</span><span class='dot token'>.</span><span class='connect identifier id'>connect</span> <span class='string val'>'google.com'</span><span class='comma token'>,</span> <span class='integer val'>80</span>
|
107
|
-
<span class='req identifier id'>req</span> <span class='assign token'>=</span> <span class='conn identifier id'>conn</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>'/'</span><span class='rparen token'>)</span>
|
108
|
-
<span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='Gentleman constant id'>Gentleman</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='conn identifier id'>conn</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='response identifier id'>response</span><span class='bitor op'>|</span>
|
109
|
-
<span class='response identifier id'>response</span><span class='dot token'>.</span><span class='content identifier id'>content</span>
|
110
|
-
<span class='end end kw'>end</span>
|
111
|
-
</pre>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
118
|
-
<ul class="summary">
|
119
|
-
|
120
|
-
<li class="public ">
|
121
|
-
<span class="summary_signature">
|
122
|
-
|
123
|
-
<a href="#callback-instance_method" title="#callback (instance method)">- (Object) <strong>callback</strong> </a>
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
</span>
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute callback.</p></div></span>
|
140
|
-
|
141
|
-
</li>
|
142
|
-
|
143
|
-
|
144
|
-
<li class="public ">
|
145
|
-
<span class="summary_signature">
|
146
|
-
|
147
|
-
<a href="#connection-instance_method" title="#connection (instance method)">- (Object) <strong>connection</strong> </a>
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
</span>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute connection.</p></div></span>
|
164
|
-
|
165
|
-
</li>
|
166
|
-
|
167
|
-
|
168
|
-
<li class="public ">
|
169
|
-
<span class="summary_signature">
|
170
|
-
|
171
|
-
<a href="#tag-instance_method" title="#tag (instance method)">- (Object) <strong>tag</strong> </a>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
</span>
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute tag.</p></div></span>
|
188
|
-
|
189
|
-
</li>
|
190
|
-
|
191
|
-
|
192
|
-
</ul>
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
<h2>
|
197
|
-
Class Method Summary
|
198
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
199
|
-
</h2>
|
200
|
-
|
201
|
-
<ul class="summary">
|
202
|
-
|
203
|
-
<li class="public ">
|
204
|
-
<span class="summary_signature">
|
205
|
-
|
206
|
-
<a href="#proxy-class_method" title="proxy (class method)">+ (Object) <strong>proxy</strong>(&block) </a>
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
</span>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
<span class="summary_desc"><div class='inline'><p>Creates a anonymous Gentleman proxy where the helper is exposed to, be able to use the Gentleman in situations where only a callback can be passed.</p></div></span>
|
220
|
-
|
221
|
-
</li>
|
222
|
-
|
223
|
-
|
224
|
-
</ul>
|
225
|
-
|
226
|
-
<h2>
|
227
|
-
Instance Method Summary
|
228
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
229
|
-
</h2>
|
230
|
-
|
231
|
-
<ul class="summary">
|
232
|
-
|
233
|
-
<li class="public ">
|
234
|
-
<span class="summary_signature">
|
235
|
-
|
236
|
-
<a href="#handle-instance_method" title="#handle (instance method)">- (Object) <strong>handle</strong>(*args) </a>
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
</span>
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
<span class="summary_desc"><div class='inline'><p>The handler that will send the response to the remote system.</p></div></span>
|
250
|
-
|
251
|
-
</li>
|
252
|
-
|
253
|
-
|
254
|
-
<li class="public ">
|
255
|
-
<span class="summary_signature">
|
256
|
-
|
257
|
-
<a href="#helper-instance_method" title="#helper (instance method)">- (Object) <strong>helper</strong> </a>
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
</span>
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<span class="summary_desc"><div class='inline'><p>The helper that will be called by the deferable to call handle later.</p></div></span>
|
271
|
-
|
272
|
-
</li>
|
273
|
-
|
274
|
-
|
275
|
-
<li class="public ">
|
276
|
-
<span class="summary_signature">
|
277
|
-
|
278
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Gentleman) <strong>initialize</strong>(deferable = nil, &callback) </a>
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
</span>
|
283
|
-
|
284
|
-
<span class="note title constructor">constructor</span>
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
<span class="summary_desc"><div class='inline'><p>create a new proxy object using a deferable or the passed block.</p></div></span>
|
294
|
-
|
295
|
-
</li>
|
296
|
-
|
297
|
-
|
298
|
-
</ul>
|
299
|
-
|
300
|
-
|
301
|
-
<div id="constructor_details" class="method_details_list">
|
302
|
-
<h2>Constructor Details</h2>
|
303
|
-
|
304
|
-
<div class="method_details first">
|
305
|
-
<p class="signature first" id="initialize-instance_method">
|
306
|
-
|
307
|
-
- (<tt><span class='object_link'><a href="" title="MarilynRPC::Gentleman (class)">Gentleman</a></span></tt>) <strong>initialize</strong>(deferable = nil, &callback)
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
</p><div class="docstring">
|
312
|
-
<div class="discussion">
|
313
|
-
<p>create a new proxy object using a deferable or the passed block.</p>
|
314
|
-
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
<div class="tags">
|
318
|
-
<h3>Parameters:</h3>
|
319
|
-
<ul class="param">
|
320
|
-
|
321
|
-
<li>
|
322
|
-
|
323
|
-
<span class='type'>(<tt>EventMachine::Deferrable</tt>)</span>
|
324
|
-
|
325
|
-
|
326
|
-
<span class='name'>deferable</span>
|
327
|
-
|
328
|
-
|
329
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
330
|
-
|
331
|
-
|
332
|
-
</li>
|
333
|
-
|
334
|
-
</ul>
|
335
|
-
|
336
|
-
</div><table class="source_code">
|
337
|
-
<tr>
|
338
|
-
<td>
|
339
|
-
<pre class="lines">
|
340
|
-
|
341
|
-
|
342
|
-
32
|
343
|
-
33
|
344
|
-
34
|
345
|
-
35
|
346
|
-
36
|
347
|
-
37
|
348
|
-
38
|
349
|
-
39
|
350
|
-
40
|
351
|
-
41</pre>
|
352
|
-
</td>
|
353
|
-
<td>
|
354
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 32</span>
|
355
|
-
|
356
|
-
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='deferable identifier id'>deferable</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='callback identifier id'>callback</span><span class='rparen token'>)</span>
|
357
|
-
<span class='@callback ivar id'>@callback</span> <span class='assign token'>=</span> <span class='callback identifier id'>callback</span>
|
358
|
-
<span class='if if kw'>if</span> <span class='deferable identifier id'>deferable</span>
|
359
|
-
<span class='unless unless kw'>unless</span> <span class='deferable identifier id'>deferable</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span> <span class='colon op'>:</span><span class='callback identifier id'>callback</span>
|
360
|
-
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"Wrong type, expected object that responds to #callback!"</span><span class='rparen token'>)</span>
|
361
|
-
<span class='end end kw'>end</span>
|
362
|
-
<span class='gentleman identifier id'>gentleman</span> <span class='assign token'>=</span> <span class='self self kw'>self</span>
|
363
|
-
<span class='deferable identifier id'>deferable</span><span class='dot token'>.</span><span class='callback identifier id'>callback</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='bitor op'>|</span> <span class='gentleman identifier id'>gentleman</span><span class='dot token'>.</span><span class='handle identifier id'>handle</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
364
|
-
<span class='end end kw'>end</span>
|
365
|
-
<span class='end end kw'>end</span>
|
366
|
-
</pre>
|
367
|
-
</td>
|
368
|
-
</tr>
|
369
|
-
</table>
|
370
|
-
</div>
|
371
|
-
|
372
|
-
</div>
|
373
|
-
|
374
|
-
<div id="instance_attr_details" class="attr_details">
|
375
|
-
<h2>Instance Attribute Details</h2>
|
376
|
-
|
377
|
-
|
378
|
-
<span id="callback=-instance_method"></span>
|
379
|
-
<span id="callback-instance_method"></span>
|
380
|
-
<div class="method_details first">
|
381
|
-
<p class="signature first" id="callback-instance_method">
|
382
|
-
|
383
|
-
- (<tt>Object</tt>) <strong>callback</strong>
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
</p><div class="docstring">
|
388
|
-
<div class="discussion">
|
389
|
-
<p>Returns the value of attribute callback</p>
|
390
|
-
|
391
|
-
</div>
|
392
|
-
</div>
|
393
|
-
<div class="tags">
|
394
|
-
|
395
|
-
</div><table class="source_code">
|
396
|
-
<tr>
|
397
|
-
<td>
|
398
|
-
<pre class="lines">
|
399
|
-
|
400
|
-
|
401
|
-
27
|
402
|
-
28
|
403
|
-
29</pre>
|
404
|
-
</td>
|
405
|
-
<td>
|
406
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 27</span>
|
407
|
-
|
408
|
-
<span class='def def kw'>def</span> <span class='callback identifier id'>callback</span>
|
409
|
-
<span class='@callback ivar id'>@callback</span>
|
410
|
-
<span class='end end kw'>end</span>
|
411
|
-
</pre>
|
412
|
-
</td>
|
413
|
-
</tr>
|
414
|
-
</table>
|
415
|
-
</div>
|
416
|
-
|
417
|
-
|
418
|
-
<span id="connection=-instance_method"></span>
|
419
|
-
<span id="connection-instance_method"></span>
|
420
|
-
<div class="method_details ">
|
421
|
-
<p class="signature " id="connection-instance_method">
|
422
|
-
|
423
|
-
- (<tt>Object</tt>) <strong>connection</strong>
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
</p><div class="docstring">
|
428
|
-
<div class="discussion">
|
429
|
-
<p>Returns the value of attribute connection</p>
|
430
|
-
|
431
|
-
</div>
|
432
|
-
</div>
|
433
|
-
<div class="tags">
|
434
|
-
|
435
|
-
</div><table class="source_code">
|
436
|
-
<tr>
|
437
|
-
<td>
|
438
|
-
<pre class="lines">
|
439
|
-
|
440
|
-
|
441
|
-
27
|
442
|
-
28
|
443
|
-
29</pre>
|
444
|
-
</td>
|
445
|
-
<td>
|
446
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 27</span>
|
447
|
-
|
448
|
-
<span class='def def kw'>def</span> <span class='connection identifier id'>connection</span>
|
449
|
-
<span class='@connection ivar id'>@connection</span>
|
450
|
-
<span class='end end kw'>end</span>
|
451
|
-
</pre>
|
452
|
-
</td>
|
453
|
-
</tr>
|
454
|
-
</table>
|
455
|
-
</div>
|
456
|
-
|
457
|
-
|
458
|
-
<span id="tag=-instance_method"></span>
|
459
|
-
<span id="tag-instance_method"></span>
|
460
|
-
<div class="method_details ">
|
461
|
-
<p class="signature " id="tag-instance_method">
|
462
|
-
|
463
|
-
- (<tt>Object</tt>) <strong>tag</strong>
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
</p><div class="docstring">
|
468
|
-
<div class="discussion">
|
469
|
-
<p>Returns the value of attribute tag</p>
|
470
|
-
|
471
|
-
</div>
|
472
|
-
</div>
|
473
|
-
<div class="tags">
|
474
|
-
|
475
|
-
</div><table class="source_code">
|
476
|
-
<tr>
|
477
|
-
<td>
|
478
|
-
<pre class="lines">
|
479
|
-
|
480
|
-
|
481
|
-
27
|
482
|
-
28
|
483
|
-
29</pre>
|
484
|
-
</td>
|
485
|
-
<td>
|
486
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 27</span>
|
487
|
-
|
488
|
-
<span class='def def kw'>def</span> <span class='tag identifier id'>tag</span>
|
489
|
-
<span class='@tag ivar id'>@tag</span>
|
490
|
-
<span class='end end kw'>end</span>
|
491
|
-
</pre>
|
492
|
-
</td>
|
493
|
-
</tr>
|
494
|
-
</table>
|
495
|
-
</div>
|
496
|
-
|
497
|
-
</div>
|
498
|
-
|
499
|
-
|
500
|
-
<div id="class_method_details" class="method_details_list">
|
501
|
-
<h2>Class Method Details</h2>
|
502
|
-
|
503
|
-
|
504
|
-
<div class="method_details first">
|
505
|
-
<p class="signature first" id="proxy-class_method">
|
506
|
-
|
507
|
-
+ (<tt>Object</tt>) <strong>proxy</strong>(&block)
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
</p><div class="docstring">
|
512
|
-
<div class="discussion">
|
513
|
-
<p>Creates a anonymous Gentleman proxy where the helper is exposed to, be able to use the Gentleman in situations where only a callback can be passed.</p>
|
514
|
-
|
515
|
-
</div>
|
516
|
-
</div>
|
517
|
-
<div class="tags">
|
518
|
-
|
519
|
-
</div><table class="source_code">
|
520
|
-
<tr>
|
521
|
-
<td>
|
522
|
-
<pre class="lines">
|
523
|
-
|
524
|
-
|
525
|
-
45
|
526
|
-
46
|
527
|
-
47
|
528
|
-
48
|
529
|
-
49</pre>
|
530
|
-
</td>
|
531
|
-
<td>
|
532
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 45</span>
|
533
|
-
|
534
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='proxy identifier id'>proxy</span><span class='lparen token'>(</span><span class='bitand op'>&</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
|
535
|
-
<span class='gentleman identifier id'>gentleman</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='Gentleman constant id'>Gentleman</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
536
|
-
<span class='gentleman identifier id'>gentleman</span><span class='dot token'>.</span><span class='callback identifier id'>callback</span> <span class='assign token'>=</span> <span class='block identifier id'>block</span><span class='dot token'>.</span><span class='call identifier id'>call</span><span class='lparen token'>(</span><span class='gentleman identifier id'>gentleman</span><span class='dot token'>.</span><span class='helper identifier id'>helper</span><span class='rparen token'>)</span>
|
537
|
-
<span class='gentleman identifier id'>gentleman</span>
|
538
|
-
<span class='end end kw'>end</span>
|
539
|
-
</pre>
|
540
|
-
</td>
|
541
|
-
</tr>
|
542
|
-
</table>
|
543
|
-
</div>
|
544
|
-
|
545
|
-
</div>
|
546
|
-
|
547
|
-
<div id="instance_method_details" class="method_details_list">
|
548
|
-
<h2>Instance Method Details</h2>
|
549
|
-
|
550
|
-
|
551
|
-
<div class="method_details first">
|
552
|
-
<p class="signature first" id="handle-instance_method">
|
553
|
-
|
554
|
-
- (<tt>Object</tt>) <strong>handle</strong>(*args)
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
</p><div class="docstring">
|
559
|
-
<div class="discussion">
|
560
|
-
<p>The handler that will send the response to the remote system</p>
|
561
|
-
|
562
|
-
</div>
|
563
|
-
</div>
|
564
|
-
<div class="tags">
|
565
|
-
<h3>Parameters:</h3>
|
566
|
-
<ul class="param">
|
567
|
-
|
568
|
-
<li>
|
569
|
-
|
570
|
-
<span class='type'>(<tt>Object</tt>)</span>
|
571
|
-
|
572
|
-
|
573
|
-
<span class='name'>args</span>
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
—
|
578
|
-
<div class='inline'><p>the arguments that should be handled by the callback, the reponse of the callback will be send as result</p></div>
|
579
|
-
|
580
|
-
</li>
|
581
|
-
|
582
|
-
</ul>
|
583
|
-
|
584
|
-
</div><table class="source_code">
|
585
|
-
<tr>
|
586
|
-
<td>
|
587
|
-
<pre class="lines">
|
588
|
-
|
589
|
-
|
590
|
-
54
|
591
|
-
55
|
592
|
-
56
|
593
|
-
57</pre>
|
594
|
-
</td>
|
595
|
-
<td>
|
596
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 54</span>
|
597
|
-
|
598
|
-
<span class='def def kw'>def</span> <span class='handle identifier id'>handle</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
|
599
|
-
<span class='mail identifier id'>mail</span> <span class='assign token'>=</span> <span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='CallResponseMail constant id'>CallResponseMail</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='tag identifier id'>tag</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='callback identifier id'>callback</span><span class='dot token'>.</span><span class='call identifier id'>call</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
600
|
-
<span class='connection identifier id'>connection</span><span class='dot token'>.</span><span class='send_mail identifier id'>send_mail</span><span class='lparen token'>(</span><span class='mail identifier id'>mail</span><span class='rparen token'>)</span>
|
601
|
-
<span class='end end kw'>end</span>
|
602
|
-
</pre>
|
603
|
-
</td>
|
604
|
-
</tr>
|
605
|
-
</table>
|
606
|
-
</div>
|
607
|
-
|
608
|
-
<div class="method_details ">
|
609
|
-
<p class="signature " id="helper-instance_method">
|
610
|
-
|
611
|
-
- (<tt>Object</tt>) <strong>helper</strong>
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
</p><div class="docstring">
|
616
|
-
<div class="discussion">
|
617
|
-
<p>The helper that will be called by the deferable to call handle later</p>
|
618
|
-
|
619
|
-
</div>
|
620
|
-
</div>
|
621
|
-
<div class="tags">
|
622
|
-
|
623
|
-
</div><table class="source_code">
|
624
|
-
<tr>
|
625
|
-
<td>
|
626
|
-
<pre class="lines">
|
627
|
-
|
628
|
-
|
629
|
-
60
|
630
|
-
61
|
631
|
-
62
|
632
|
-
63</pre>
|
633
|
-
</td>
|
634
|
-
<td>
|
635
|
-
<pre class="code"><span class="info file"># File 'lib/marilyn-rpc/gentleman.rb', line 60</span>
|
636
|
-
|
637
|
-
<span class='def def kw'>def</span> <span class='helper identifier id'>helper</span>
|
638
|
-
<span class='gentleman identifier id'>gentleman</span> <span class='assign token'>=</span> <span class='self self kw'>self</span>
|
639
|
-
<span class='lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='bitor op'>|</span> <span class='gentleman identifier id'>gentleman</span><span class='dot token'>.</span><span class='handle identifier id'>handle</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
640
|
-
<span class='end end kw'>end</span>
|
641
|
-
</pre>
|
642
|
-
</td>
|
643
|
-
</tr>
|
644
|
-
</table>
|
645
|
-
</div>
|
646
|
-
|
647
|
-
</div>
|
648
|
-
|
649
|
-
</div>
|
650
|
-
|
651
|
-
<div id="footer">
|
652
|
-
Generated on Wed Jun 8 18:26:47 2011 by
|
653
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
654
|
-
0.6.8 (ruby-1.8.7).
|
655
|
-
</div>
|
656
|
-
|
657
|
-
</body>
|
658
|
-
</html>
|