source: branches/objectmq_old/lib/rabbitmq-java-client-javadoc-3.0.1/com/rabbitmq/tools/jsonrpc/JsonRpcServer.html

Last change on this file was 9, checked in by stoda, 12 years ago

First commit

File size: 26.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_18) on Tue Dec 11 11:47:10 GMT 2012 -->
6<TITLE>
7JsonRpcServer
8</TITLE>
9
10<META NAME="date" CONTENT="2012-12-11">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="JsonRpcServer";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47  </TR>
48</TABLE>
49</TD>
50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51</EM>
52</TD>
53</TR>
54
55<TR>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc"><B>PREV CLASS</B></A>&nbsp;
58&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/ParameterDescription.html" title="class in com.rabbitmq.tools.jsonrpc"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60  <A HREF="../../../../index.html?com/rabbitmq/tools/jsonrpc/JsonRpcServer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="JsonRpcServer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62&nbsp;<SCRIPT type="text/javascript">
63  <!--
64  if(window==top) {
65    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66  }
67  //-->
68</SCRIPT>
69<NOSCRIPT>
70  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71</NOSCRIPT>
72
73
74</FONT></TD>
75</TR>
76<TR>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81</TR>
82</TABLE>
83<A NAME="skip-navbar_top"></A>
84<!-- ========= END OF TOP NAVBAR ========= -->
85
86<HR>
87<!-- ======== START OF CLASS DATA ======== -->
88<H2>
89<FONT SIZE="-1">
90com.rabbitmq.tools.jsonrpc</FONT>
91<BR>
92Class JsonRpcServer</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/rabbitmq/client/RpcServer.html" title="class in com.rabbitmq.client">com.rabbitmq.client.RpcServer</A>
96      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/rabbitmq/client/StringRpcServer.html" title="class in com.rabbitmq.client">com.rabbitmq.client.StringRpcServer</A>
97          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.tools.jsonrpc.JsonRpcServer</B>
98</PRE>
99<HR>
100<DL>
101<DT><PRE>public class <B>JsonRpcServer</B><DT>extends <A HREF="../../../../com/rabbitmq/client/StringRpcServer.html" title="class in com.rabbitmq.client">StringRpcServer</A></DL>
102</PRE>
103
104<P>
105JSON-RPC Server class.
106
107 Given a Java <CODE>Class</CODE>, representing an interface, and an
108 implementation of that interface, JsonRpcServer will reflect on the
109 class to construct the <A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc"><CODE>ServiceDescription</CODE></A>, and will route
110 incoming requests for methods on the interface to the
111 implementation object while the mainloop() is running.
112<P>
113
114<P>
115<DL>
116<DT><B>See Also:</B><DD><A HREF="../../../../com/rabbitmq/client/RpcServer.html" title="class in com.rabbitmq.client"><CODE>RpcServer</CODE></A>,
117<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html" title="class in com.rabbitmq.tools.jsonrpc"><CODE>JsonRpcClient</CODE></A></DL>
118<HR>
119
120<P>
121<!-- =========== FIELD SUMMARY =========== -->
122
123<A NAME="field_summary"><!-- --></A>
124<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
127<B>Field Summary</B></FONT></TH>
128</TR>
129<TR BGCOLOR="white" CLASS="TableRowColor">
130<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131<CODE>&nbsp;java.lang.Class&lt;?&gt;</CODE></FONT></TD>
132<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#interfaceClass">interfaceClass</A></B></CODE>
133
134<BR>
135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The interface this server implements.</TD>
136</TR>
137<TR BGCOLOR="white" CLASS="TableRowColor">
138<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
140<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#interfaceInstance">interfaceInstance</A></B></CODE>
141
142<BR>
143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The instance backing this server.</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A></CODE></FONT></TD>
148<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#serviceDescription">serviceDescription</A></B></CODE>
149
150<BR>
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Holds the JSON-RPC service description for this client.</TD>
152</TR>
153</TABLE>
154&nbsp;<A NAME="fields_inherited_from_class_com.rabbitmq.client.StringRpcServer"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
157<TH ALIGN="left"><B>Fields inherited from class com.rabbitmq.client.<A HREF="../../../../com/rabbitmq/client/StringRpcServer.html" title="class in com.rabbitmq.client">StringRpcServer</A></B></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD><CODE><A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#STRING_ENCODING">STRING_ENCODING</A></CODE></TD>
161</TR>
162</TABLE>
163&nbsp;
164<!-- ======== CONSTRUCTOR SUMMARY ======== -->
165
166<A NAME="constructor_summary"><!-- --></A>
167<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
168<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
169<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
170<B>Constructor Summary</B></FONT></TH>
171</TR>
172<TR BGCOLOR="white" CLASS="TableRowColor">
173<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#JsonRpcServer(com.rabbitmq.client.Channel, java.lang.Class, java.lang.Object)">JsonRpcServer</A></B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
174              java.lang.Class&lt;?&gt;&nbsp;interfaceClass,
175              java.lang.Object&nbsp;interfaceInstance)</CODE>
176
177<BR>
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a server that talks to the outside world using the
179 given channel, and constructs a fresh temporary
180 queue.</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#JsonRpcServer(com.rabbitmq.client.Channel, java.lang.String, java.lang.Class, java.lang.Object)">JsonRpcServer</A></B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
184              java.lang.String&nbsp;queueName,
185              java.lang.Class&lt;?&gt;&nbsp;interfaceClass,
186              java.lang.Object&nbsp;interfaceInstance)</CODE>
187
188<BR>
189&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a server that talks to the outside world using the
190 given channel and queue name.</TD>
191</TR>
192</TABLE>
193&nbsp;
194<!-- ========== METHOD SUMMARY =========== -->
195
196<A NAME="method_summary"><!-- --></A>
197<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
198<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
199<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
200<B>Method Summary</B></FONT></TH>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
205<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#doCall(java.lang.String)">doCall</A></B>(java.lang.String&nbsp;requestBody)</CODE>
206
207<BR>
208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Runs a single JSON-RPC request.</TD>
209</TR>
210<TR BGCOLOR="white" CLASS="TableRowColor">
211<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
213<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#errorResponse(java.lang.Object, int, java.lang.String, java.lang.Object)">errorResponse</A></B>(java.lang.Object&nbsp;id,
214              int&nbsp;code,
215              java.lang.String&nbsp;message,
216              java.lang.Object&nbsp;errorArg)</CODE>
217
218<BR>
219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct and encode a JSON-RPC error response for the request
220 ID given, using the code, message, and possible
221 (JSON-encodable) argument passed in.</TD>
222</TR>
223<TR BGCOLOR="white" CLASS="TableRowColor">
224<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
225<CODE>&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A></CODE></FONT></TD>
226<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#getServiceDescription()">getServiceDescription</A></B>()</CODE>
227
228<BR>
229&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - gets the service description record that this
230 service built from interfaceClass at construction time.</TD>
231</TR>
232<TR BGCOLOR="white" CLASS="TableRowColor">
233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
234<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
235<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#handleStringCall(java.lang.String, com.rabbitmq.client.AMQP.BasicProperties)">handleStringCall</A></B>(java.lang.String&nbsp;requestBody,
236                 <A HREF="../../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;replyProperties)</CODE>
237
238<BR>
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override our superclass' method, dispatching to doCall.</TD>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243<CODE>&nbsp;java.lang.reflect.Method</CODE></FONT></TD>
244<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#matchingMethod(java.lang.String, java.lang.Object[])">matchingMethod</A></B>(java.lang.String&nbsp;methodName,
245               java.lang.Object[]&nbsp;params)</CODE>
246
247<BR>
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the best matching method for the given method name and parameters.</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#response(java.lang.Object, java.lang.String, java.lang.Object)">response</A></B>(java.lang.Object&nbsp;id,
254         java.lang.String&nbsp;label,
255         java.lang.Object&nbsp;value)</CODE>
256
257<BR>
258&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Private API - used by errorResponse and resultResponse.</TD>
259</TR>
260<TR BGCOLOR="white" CLASS="TableRowColor">
261<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
262<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
263<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcServer.html#resultResponse(java.lang.Object, java.lang.Object)">resultResponse</A></B>(java.lang.Object&nbsp;id,
264               java.lang.Object&nbsp;result)</CODE>
265
266<BR>
267&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct and encode a JSON-RPC success response for the
268 request ID given, using the result value passed in.</TD>
269</TR>
270</TABLE>
271&nbsp;<A NAME="methods_inherited_from_class_com.rabbitmq.client.StringRpcServer"><!-- --></A>
272<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
273<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
274<TH ALIGN="left"><B>Methods inherited from class com.rabbitmq.client.<A HREF="../../../../com/rabbitmq/client/StringRpcServer.html" title="class in com.rabbitmq.client">StringRpcServer</A></B></TH>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD><CODE><A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#handleCall(byte[], com.rabbitmq.client.AMQP.BasicProperties)">handleCall</A>, <A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#handleCast(byte[])">handleCast</A>, <A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#handleStringCall(java.lang.String)">handleStringCall</A>, <A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#handleStringCast(java.lang.String)">handleStringCast</A></CODE></TD>
278</TR>
279</TABLE>
280&nbsp;<A NAME="methods_inherited_from_class_com.rabbitmq.client.RpcServer"><!-- --></A>
281<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
282<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
283<TH ALIGN="left"><B>Methods inherited from class com.rabbitmq.client.<A HREF="../../../../com/rabbitmq/client/RpcServer.html" title="class in com.rabbitmq.client">RpcServer</A></B></TH>
284</TR>
285<TR BGCOLOR="white" CLASS="TableRowColor">
286<TD><CODE><A HREF="../../../../com/rabbitmq/client/RpcServer.html#close()">close</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#getChannel()">getChannel</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#getQueueName()">getQueueName</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#handleCall(com.rabbitmq.client.AMQP.BasicProperties, byte[], com.rabbitmq.client.AMQP.BasicProperties)">handleCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#handleCall(com.rabbitmq.client.QueueingConsumer.Delivery, com.rabbitmq.client.AMQP.BasicProperties)">handleCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#handleCast(com.rabbitmq.client.AMQP.BasicProperties, byte[])">handleCast</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#handleCast(com.rabbitmq.client.QueueingConsumer.Delivery)">handleCast</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#mainloop()">mainloop</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#processRequest(com.rabbitmq.client.QueueingConsumer.Delivery)">processRequest</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#setupConsumer()">setupConsumer</A>, <A HREF="../../../../com/rabbitmq/client/RpcServer.html#terminateMainloop()">terminateMainloop</A></CODE></TD>
287</TR>
288</TABLE>
289&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
290<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
291<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
292<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
293</TR>
294<TR BGCOLOR="white" CLASS="TableRowColor">
295<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
296</TR>
297</TABLE>
298&nbsp;
299<P>
300
301<!-- ============ FIELD DETAIL =========== -->
302
303<A NAME="field_detail"><!-- --></A>
304<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
305<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
306<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
307<B>Field Detail</B></FONT></TH>
308</TR>
309</TABLE>
310
311<A NAME="serviceDescription"><!-- --></A><H3>
312serviceDescription</H3>
313<PRE>
314public <A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A> <B>serviceDescription</B></PRE>
315<DL>
316<DD>Holds the JSON-RPC service description for this client.
317<P>
318<DL>
319</DL>
320</DL>
321<HR>
322
323<A NAME="interfaceClass"><!-- --></A><H3>
324interfaceClass</H3>
325<PRE>
326public java.lang.Class&lt;?&gt; <B>interfaceClass</B></PRE>
327<DL>
328<DD>The interface this server implements.
329<P>
330<DL>
331</DL>
332</DL>
333<HR>
334
335<A NAME="interfaceInstance"><!-- --></A><H3>
336interfaceInstance</H3>
337<PRE>
338public java.lang.Object <B>interfaceInstance</B></PRE>
339<DL>
340<DD>The instance backing this server.
341<P>
342<DL>
343</DL>
344</DL>
345
346<!-- ========= CONSTRUCTOR DETAIL ======== -->
347
348<A NAME="constructor_detail"><!-- --></A>
349<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
350<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
351<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
352<B>Constructor Detail</B></FONT></TH>
353</TR>
354</TABLE>
355
356<A NAME="JsonRpcServer(com.rabbitmq.client.Channel, java.lang.Class, java.lang.Object)"><!-- --></A><H3>
357JsonRpcServer</H3>
358<PRE>
359public <B>JsonRpcServer</B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
360                     java.lang.Class&lt;?&gt;&nbsp;interfaceClass,
361                     java.lang.Object&nbsp;interfaceInstance)
362              throws java.io.IOException</PRE>
363<DL>
364<DD>Construct a server that talks to the outside world using the
365 given channel, and constructs a fresh temporary
366 queue. Use getQueueName() to discover the created queue name.
367<P>
368<DL>
369<DT><B>Parameters:</B><DD><CODE>channel</CODE> - AMQP channel to use<DD><CODE>interfaceClass</CODE> - Java interface that this server is exposing to the world<DD><CODE>interfaceInstance</CODE> - Java instance (of interfaceClass) that is being exposed
370<DT><B>Throws:</B>
371<DD><CODE>java.io.IOException</CODE> - if something goes wrong during an AMQP operation</DL>
372</DL>
373<HR>
374
375<A NAME="JsonRpcServer(com.rabbitmq.client.Channel, java.lang.String, java.lang.Class, java.lang.Object)"><!-- --></A><H3>
376JsonRpcServer</H3>
377<PRE>
378public <B>JsonRpcServer</B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
379                     java.lang.String&nbsp;queueName,
380                     java.lang.Class&lt;?&gt;&nbsp;interfaceClass,
381                     java.lang.Object&nbsp;interfaceInstance)
382              throws java.io.IOException</PRE>
383<DL>
384<DD>Construct a server that talks to the outside world using the
385 given channel and queue name. Our superclass,
386 RpcServer, expects the queue to exist at the time of
387 construction.
388<P>
389<DL>
390<DT><B>Parameters:</B><DD><CODE>channel</CODE> - AMQP channel to use<DD><CODE>queueName</CODE> - AMQP queue name to listen for requests on<DD><CODE>interfaceClass</CODE> - Java interface that this server is exposing to the world<DD><CODE>interfaceInstance</CODE> - Java instance (of interfaceClass) that is being exposed
391<DT><B>Throws:</B>
392<DD><CODE>java.io.IOException</CODE> - if something goes wrong during an AMQP operation</DL>
393</DL>
394
395<!-- ============ METHOD DETAIL ========== -->
396
397<A NAME="method_detail"><!-- --></A>
398<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
399<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
400<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
401<B>Method Detail</B></FONT></TH>
402</TR>
403</TABLE>
404
405<A NAME="handleStringCall(java.lang.String, com.rabbitmq.client.AMQP.BasicProperties)"><!-- --></A><H3>
406handleStringCall</H3>
407<PRE>
408public java.lang.String <B>handleStringCall</B>(java.lang.String&nbsp;requestBody,
409                                         <A HREF="../../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;replyProperties)</PRE>
410<DL>
411<DD>Override our superclass' method, dispatching to doCall.
412<P>
413<DD><DL>
414<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/rabbitmq/client/StringRpcServer.html#handleStringCall(java.lang.String, com.rabbitmq.client.AMQP.BasicProperties)">handleStringCall</A></CODE> in class <CODE><A HREF="../../../../com/rabbitmq/client/StringRpcServer.html" title="class in com.rabbitmq.client">StringRpcServer</A></CODE></DL>
415</DD>
416<DD><DL>
417</DL>
418</DD>
419</DL>
420<HR>
421
422<A NAME="doCall(java.lang.String)"><!-- --></A><H3>
423doCall</H3>
424<PRE>
425public java.lang.String <B>doCall</B>(java.lang.String&nbsp;requestBody)</PRE>
426<DL>
427<DD>Runs a single JSON-RPC request.
428<P>
429<DD><DL>
430<DT><B>Parameters:</B><DD><CODE>requestBody</CODE> - the JSON-RPC request string (a JSON encoded value)
431<DT><B>Returns:</B><DD>a JSON-RPC response string (a JSON encoded value)</DL>
432</DD>
433</DL>
434<HR>
435
436<A NAME="matchingMethod(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
437matchingMethod</H3>
438<PRE>
439public java.lang.reflect.Method <B>matchingMethod</B>(java.lang.String&nbsp;methodName,
440                                               java.lang.Object[]&nbsp;params)</PRE>
441<DL>
442<DD>Retrieves the best matching method for the given method name and parameters.
443
444 Subclasses may override this if they have specialised
445 dispatching requirements, so long as they continue to honour
446 their ServiceDescription.
447<P>
448<DD><DL>
449</DL>
450</DD>
451</DL>
452<HR>
453
454<A NAME="errorResponse(java.lang.Object, int, java.lang.String, java.lang.Object)"><!-- --></A><H3>
455errorResponse</H3>
456<PRE>
457public static java.lang.String <B>errorResponse</B>(java.lang.Object&nbsp;id,
458                                             int&nbsp;code,
459                                             java.lang.String&nbsp;message,
460                                             java.lang.Object&nbsp;errorArg)</PRE>
461<DL>
462<DD>Construct and encode a JSON-RPC error response for the request
463 ID given, using the code, message, and possible
464 (JSON-encodable) argument passed in.
465<P>
466<DD><DL>
467</DL>
468</DD>
469</DL>
470<HR>
471
472<A NAME="resultResponse(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
473resultResponse</H3>
474<PRE>
475public static java.lang.String <B>resultResponse</B>(java.lang.Object&nbsp;id,
476                                              java.lang.Object&nbsp;result)</PRE>
477<DL>
478<DD>Construct and encode a JSON-RPC success response for the
479 request ID given, using the result value passed in.
480<P>
481<DD><DL>
482</DL>
483</DD>
484</DL>
485<HR>
486
487<A NAME="response(java.lang.Object, java.lang.String, java.lang.Object)"><!-- --></A><H3>
488response</H3>
489<PRE>
490public static java.lang.String <B>response</B>(java.lang.Object&nbsp;id,
491                                        java.lang.String&nbsp;label,
492                                        java.lang.Object&nbsp;value)</PRE>
493<DL>
494<DD>Private API - used by errorResponse and resultResponse.
495<P>
496<DD><DL>
497</DL>
498</DD>
499</DL>
500<HR>
501
502<A NAME="getServiceDescription()"><!-- --></A><H3>
503getServiceDescription</H3>
504<PRE>
505public <A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A> <B>getServiceDescription</B>()</PRE>
506<DL>
507<DD>Public API - gets the service description record that this
508 service built from interfaceClass at construction time.
509<P>
510<DD><DL>
511</DL>
512</DD>
513</DL>
514<!-- ========= END OF CLASS DATA ========= -->
515<HR>
516
517
518<!-- ======= START OF BOTTOM NAVBAR ====== -->
519<A NAME="navbar_bottom"><!-- --></A>
520<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
521<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
522<TR>
523<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
524<A NAME="navbar_bottom_firstrow"><!-- --></A>
525<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
526  <TR ALIGN="center" VALIGN="top">
527  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
528  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
529  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
530  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
531  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
532  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
533  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
534  </TR>
535</TABLE>
536</TD>
537<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
538</EM>
539</TD>
540</TR>
541
542<TR>
543<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
544&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc"><B>PREV CLASS</B></A>&nbsp;
545&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/ParameterDescription.html" title="class in com.rabbitmq.tools.jsonrpc"><B>NEXT CLASS</B></A></FONT></TD>
546<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
547  <A HREF="../../../../index.html?com/rabbitmq/tools/jsonrpc/JsonRpcServer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
548&nbsp;<A HREF="JsonRpcServer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
549&nbsp;<SCRIPT type="text/javascript">
550  <!--
551  if(window==top) {
552    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
553  }
554  //-->
555</SCRIPT>
556<NOSCRIPT>
557  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
558</NOSCRIPT>
559
560
561</FONT></TD>
562</TR>
563<TR>
564<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
565  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
566<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
567DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
568</TR>
569</TABLE>
570<A NAME="skip-navbar_bottom"></A>
571<!-- ======== END OF BOTTOM NAVBAR ======= -->
572
573<HR>
574
575</BODY>
576</HTML>
Note: See TracBrowser for help on using the repository browser.