source: branches/objectmq-1.0/lib/rabbitmq-java-client-javadoc-3.0.1/com/rabbitmq/tools/jsonrpc/JsonRpcClient.html

Last change on this file was 33, checked in by amoreno, 11 years ago

new release version

File size: 26.1 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>
7JsonRpcClient
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="JsonRpcClient";
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;PREV CLASS&nbsp;
58&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.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/JsonRpcClient.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="JsonRpcClient.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="#fields_inherited_from_class_com.rabbitmq.client.RpcClient">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;FIELD&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 JsonRpcClient</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/rabbitmq/client/RpcClient.html" title="class in com.rabbitmq.client">com.rabbitmq.client.RpcClient</A>
96      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.tools.jsonrpc.JsonRpcClient</B>
97</PRE>
98<DL>
99<DT><B>All Implemented Interfaces:</B> <DD>java.lang.reflect.InvocationHandler</DD>
100</DL>
101<HR>
102<DL>
103<DT><PRE>public class <B>JsonRpcClient</B><DT>extends <A HREF="../../../../com/rabbitmq/client/RpcClient.html" title="class in com.rabbitmq.client">RpcClient</A><DT>implements java.lang.reflect.InvocationHandler</DL>
104</PRE>
105
106<P>
107<a href="http://json-rpc.org">JSON-RPC</a> is a lightweight
108          RPC mechanism using <a href="http://www.json.org/">JSON</a>
109          as a data language for request and reply messages. It is
110          rapidly becoming a standard in web development, where it is
111          used to make RPC requests over HTTP. RabbitMQ provides an
112          AMQP transport binding for JSON-RPC in the form of the
113          <code>JsonRpcClient</code> class.
114
115          JSON-RPC services are self-describing - each service is able
116          to list its supported procedures, and each procedure
117          describes its parameters and types. An instance of
118          JsonRpcClient retrieves its service description using the
119          standard <code>system.describe</code> procedure when it is
120          constructed, and uses the information to coerce parameter
121          types appropriately. A JSON service description is parsed
122          into instances of <code>ServiceDescription</code>. Client
123          code can access the service description by reading the
124          <code>serviceDescription</code> field of
125          <code>JsonRpcClient</code> instances.
126<P>
127
128<P>
129<DL>
130<DT><B>See Also:</B><DD><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String, java.lang.Object[])"><CODE>call(String, Object[])</CODE></A>,
131<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String[])"><CODE>call(String[])</CODE></A></DL>
132<HR>
133
134<P>
135<!-- =========== FIELD SUMMARY =========== -->
136
137<A NAME="field_summary"><!-- --></A>
138<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
141<B>Field Summary</B></FONT></TH>
142</TR>
143</TABLE>
144&nbsp;<A NAME="fields_inherited_from_class_com.rabbitmq.client.RpcClient"><!-- --></A>
145<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
146<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
147<TH ALIGN="left"><B>Fields inherited from class com.rabbitmq.client.<A HREF="../../../../com/rabbitmq/client/RpcClient.html" title="class in com.rabbitmq.client">RpcClient</A></B></TH>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD><CODE><A HREF="../../../../com/rabbitmq/client/RpcClient.html#NO_TIMEOUT">NO_TIMEOUT</A></CODE></TD>
151</TR>
152</TABLE>
153&nbsp;
154<!-- ======== CONSTRUCTOR SUMMARY ======== -->
155
156<A NAME="constructor_summary"><!-- --></A>
157<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
158<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
159<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
160<B>Constructor Summary</B></FONT></TH>
161</TR>
162<TR BGCOLOR="white" CLASS="TableRowColor">
163<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#JsonRpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String)">JsonRpcClient</A></B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
164              java.lang.String&nbsp;exchange,
165              java.lang.String&nbsp;routingKey)</CODE>
166
167<BR>
168&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
169</TR>
170<TR BGCOLOR="white" CLASS="TableRowColor">
171<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#JsonRpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String, int)">JsonRpcClient</A></B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
172              java.lang.String&nbsp;exchange,
173              java.lang.String&nbsp;routingKey,
174              int&nbsp;timeout)</CODE>
175
176<BR>
177&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new JsonRpcClient, passing the parameters through
178 to RpcClient's constructor.</TD>
179</TR>
180</TABLE>
181&nbsp;
182<!-- ========== METHOD SUMMARY =========== -->
183
184<A NAME="method_summary"><!-- --></A>
185<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
186<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
187<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
188<B>Method Summary</B></FONT></TH>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String[])">call</A></B>(java.lang.String[]&nbsp;args)</CODE>
194
195<BR>
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - as <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String, java.lang.Object[])"><CODE>call(String,Object[])</CODE></A>, but takes the
197 method name from the first entry in <code>args</code>, and the
198 parameters from subsequent entries.</TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
203<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String, java.lang.Object[])">call</A></B>(java.lang.String&nbsp;method,
204     java.lang.Object[]&nbsp;params)</CODE>
205
206<BR>
207&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - builds, encodes and sends a JSON-RPC request, and
208 waits for the response.</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.Object</CODE></FONT></TD>
213<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#checkReply(java.util.Map)">checkReply</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;reply)</CODE>
214
215<BR>
216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Private API - parses a JSON-RPC reply object, checking it for exceptions.</TD>
217</TR>
218<TR BGCOLOR="white" CLASS="TableRowColor">
219<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
220<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
221<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#coerce(java.lang.String, java.lang.String)">coerce</A></B>(java.lang.String&nbsp;val,
222       java.lang.String&nbsp;type)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Private API - used by <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String[])"><CODE>call(String[])</CODE></A> to ad-hoc convert
226 strings into the required data types for a call.</TD>
227</TR>
228<TR BGCOLOR="white" CLASS="TableRowColor">
229<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
230<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
231<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#createProxy(java.lang.Class)">createProxy</A></B>(java.lang.Class&lt;?&gt;&nbsp;klass)</CODE>
232
233<BR>
234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - gets a dynamic proxy for a particular interface class.</TD>
235</TR>
236<TR BGCOLOR="white" CLASS="TableRowColor">
237<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
238<CODE>&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A></CODE></FONT></TD>
239<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#getServiceDescription()">getServiceDescription</A></B>()</CODE>
240
241<BR>
242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - gets the service description record that this
243 service loaded from the server itself at construction time.</TD>
244</TR>
245<TR BGCOLOR="white" CLASS="TableRowColor">
246<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
248<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])">invoke</A></B>(java.lang.Object&nbsp;proxy,
249       java.lang.reflect.Method&nbsp;method,
250       java.lang.Object[]&nbsp;args)</CODE>
251
252<BR>
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - implements InvocationHandler.invoke.</TD>
254</TR>
255</TABLE>
256&nbsp;<A NAME="methods_inherited_from_class_com.rabbitmq.client.RpcClient"><!-- --></A>
257<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
258<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
259<TH ALIGN="left"><B>Methods inherited from class com.rabbitmq.client.<A HREF="../../../../com/rabbitmq/client/RpcClient.html" title="class in com.rabbitmq.client">RpcClient</A></B></TH>
260</TR>
261<TR BGCOLOR="white" CLASS="TableRowColor">
262<TD><CODE><A HREF="../../../../com/rabbitmq/client/RpcClient.html#checkConsumer()">checkConsumer</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#close()">close</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getChannel()">getChannel</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getConsumer()">getConsumer</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getContinuationMap()">getContinuationMap</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getCorrelationId()">getCorrelationId</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getExchange()">getExchange</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getReplyQueue()">getReplyQueue</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#getRoutingKey()">getRoutingKey</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#mapCall(java.util.Map)">mapCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#mapCall(java.lang.Object[])">mapCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#primitiveCall(com.rabbitmq.client.AMQP.BasicProperties, byte[])">primitiveCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#primitiveCall(byte[])">primitiveCall</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#publish(com.rabbitmq.client.AMQP.BasicProperties, byte[])">publish</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#setupConsumer()">setupConsumer</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#setupReplyQueue()">setupReplyQueue</A>, <A HREF="../../../../com/rabbitmq/client/RpcClient.html#stringCall(java.lang.String)">stringCall</A></CODE></TD>
263</TR>
264</TABLE>
265&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
266<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
267<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
268<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
269</TR>
270<TR BGCOLOR="white" CLASS="TableRowColor">
271<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
272</TR>
273</TABLE>
274&nbsp;
275<P>
276
277<!-- ========= CONSTRUCTOR DETAIL ======== -->
278
279<A NAME="constructor_detail"><!-- --></A>
280<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
281<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
282<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
283<B>Constructor Detail</B></FONT></TH>
284</TR>
285</TABLE>
286
287<A NAME="JsonRpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String, int)"><!-- --></A><H3>
288JsonRpcClient</H3>
289<PRE>
290public <B>JsonRpcClient</B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
291                     java.lang.String&nbsp;exchange,
292                     java.lang.String&nbsp;routingKey,
293                     int&nbsp;timeout)
294              throws java.io.IOException,
295                     <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A>,
296                     java.util.concurrent.TimeoutException</PRE>
297<DL>
298<DD>Construct a new JsonRpcClient, passing the parameters through
299 to RpcClient's constructor. The service description record is
300 retrieved from the server during construction.
301<P>
302<DL>
303
304<DT><B>Throws:</B>
305<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a response is not received within the timeout specified, if any
306<DD><CODE>java.io.IOException</CODE>
307<DD><CODE><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></CODE></DL>
308</DL>
309<HR>
310
311<A NAME="JsonRpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String)"><!-- --></A><H3>
312JsonRpcClient</H3>
313<PRE>
314public <B>JsonRpcClient</B>(<A HREF="../../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
315                     java.lang.String&nbsp;exchange,
316                     java.lang.String&nbsp;routingKey)
317              throws java.io.IOException,
318                     <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A>,
319                     java.util.concurrent.TimeoutException</PRE>
320<DL>
321<DL>
322
323<DT><B>Throws:</B>
324<DD><CODE>java.io.IOException</CODE>
325<DD><CODE><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></CODE>
326<DD><CODE>java.util.concurrent.TimeoutException</CODE></DL>
327</DL>
328
329<!-- ============ METHOD DETAIL ========== -->
330
331<A NAME="method_detail"><!-- --></A>
332<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
333<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
334<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
335<B>Method Detail</B></FONT></TH>
336</TR>
337</TABLE>
338
339<A NAME="checkReply(java.util.Map)"><!-- --></A><H3>
340checkReply</H3>
341<PRE>
342public static java.lang.Object <B>checkReply</B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;reply)
343                                   throws <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></PRE>
344<DL>
345<DD>Private API - parses a JSON-RPC reply object, checking it for exceptions.
346<P>
347<DD><DL>
348</DL>
349</DD>
350<DD><DL>
351
352<DT><B>Returns:</B><DD>the result contained within the reply, if no exception is found
353 Throws JsonRpcException if the reply object contained an exception
354<DT><B>Throws:</B>
355<DD><CODE><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></CODE></DL>
356</DD>
357</DL>
358<HR>
359
360<A NAME="call(java.lang.String, java.lang.Object[])"><!-- --></A><H3>
361call</H3>
362<PRE>
363public java.lang.Object <B>call</B>(java.lang.String&nbsp;method,
364                             java.lang.Object[]&nbsp;params)
365                      throws java.io.IOException,
366                             <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A>,
367                             java.util.concurrent.TimeoutException</PRE>
368<DL>
369<DD>Public API - builds, encodes and sends a JSON-RPC request, and
370 waits for the response.
371<P>
372<DD><DL>
373</DL>
374</DD>
375<DD><DL>
376
377<DT><B>Returns:</B><DD>the result contained within the reply, if no exception is found
378<DT><B>Throws:</B>
379<DD><CODE><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></CODE> - if the reply object contained an exception
380<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a response is not received within the timeout specified, if any
381<DD><CODE>java.io.IOException</CODE></DL>
382</DD>
383</DL>
384<HR>
385
386<A NAME="invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])"><!-- --></A><H3>
387invoke</H3>
388<PRE>
389public java.lang.Object <B>invoke</B>(java.lang.Object&nbsp;proxy,
390                               java.lang.reflect.Method&nbsp;method,
391                               java.lang.Object[]&nbsp;args)
392                        throws java.lang.Throwable</PRE>
393<DL>
394<DD>Public API - implements InvocationHandler.invoke. This is
395 useful for constructing dynamic proxies for JSON-RPC
396 interfaces.
397<P>
398<DD><DL>
399<DT><B>Specified by:</B><DD><CODE>invoke</CODE> in interface <CODE>java.lang.reflect.InvocationHandler</CODE></DL>
400</DD>
401<DD><DL>
402
403<DT><B>Throws:</B>
404<DD><CODE>java.lang.Throwable</CODE></DL>
405</DD>
406</DL>
407<HR>
408
409<A NAME="createProxy(java.lang.Class)"><!-- --></A><H3>
410createProxy</H3>
411<PRE>
412public java.lang.Object <B>createProxy</B>(java.lang.Class&lt;?&gt;&nbsp;klass)
413                             throws java.lang.IllegalArgumentException</PRE>
414<DL>
415<DD>Public API - gets a dynamic proxy for a particular interface class.
416<P>
417<DD><DL>
418</DL>
419</DD>
420<DD><DL>
421
422<DT><B>Throws:</B>
423<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
424</DD>
425</DL>
426<HR>
427
428<A NAME="coerce(java.lang.String, java.lang.String)"><!-- --></A><H3>
429coerce</H3>
430<PRE>
431public static java.lang.Object <B>coerce</B>(java.lang.String&nbsp;val,
432                                      java.lang.String&nbsp;type)
433                               throws java.lang.NumberFormatException</PRE>
434<DL>
435<DD>Private API - used by <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String[])"><CODE>call(String[])</CODE></A> to ad-hoc convert
436 strings into the required data types for a call.
437<P>
438<DD><DL>
439</DL>
440</DD>
441<DD><DL>
442
443<DT><B>Throws:</B>
444<DD><CODE>java.lang.NumberFormatException</CODE></DL>
445</DD>
446</DL>
447<HR>
448
449<A NAME="call(java.lang.String[])"><!-- --></A><H3>
450call</H3>
451<PRE>
452public java.lang.Object <B>call</B>(java.lang.String[]&nbsp;args)
453                      throws java.lang.NumberFormatException,
454                             java.io.IOException,
455                             <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A>,
456                             java.util.concurrent.TimeoutException</PRE>
457<DL>
458<DD>Public API - as <A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#call(java.lang.String, java.lang.Object[])"><CODE>call(String,Object[])</CODE></A>, but takes the
459 method name from the first entry in <code>args</code>, and the
460 parameters from subsequent entries. All parameter values are
461 passed through coerce() to attempt to make them the types the
462 server is expecting.
463<P>
464<DD><DL>
465</DL>
466</DD>
467<DD><DL>
468
469<DT><B>Returns:</B><DD>the result contained within the reply, if no exception is found
470<DT><B>Throws:</B>
471<DD><CODE><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcException</A></CODE> - if the reply object contained an exception
472<DD><CODE>java.lang.NumberFormatException</CODE> - if a coercion failed
473<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a response is not received within the timeout specified, if any
474<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html#coerce(java.lang.String, java.lang.String)"><CODE>coerce(java.lang.String, java.lang.String)</CODE></A></DL>
475</DD>
476</DL>
477<HR>
478
479<A NAME="getServiceDescription()"><!-- --></A><H3>
480getServiceDescription</H3>
481<PRE>
482public <A HREF="../../../../com/rabbitmq/tools/jsonrpc/ServiceDescription.html" title="class in com.rabbitmq.tools.jsonrpc">ServiceDescription</A> <B>getServiceDescription</B>()</PRE>
483<DL>
484<DD>Public API - gets the service description record that this
485 service loaded from the server itself at construction time.
486<P>
487<DD><DL>
488</DL>
489</DD>
490<DD><DL>
491</DL>
492</DD>
493</DL>
494<!-- ========= END OF CLASS DATA ========= -->
495<HR>
496
497
498<!-- ======= START OF BOTTOM NAVBAR ====== -->
499<A NAME="navbar_bottom"><!-- --></A>
500<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
501<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
502<TR>
503<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
504<A NAME="navbar_bottom_firstrow"><!-- --></A>
505<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
506  <TR ALIGN="center" VALIGN="top">
507  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
508  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
509  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
510  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
511  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
512  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
513  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
514  </TR>
515</TABLE>
516</TD>
517<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
518</EM>
519</TD>
520</TR>
521
522<TR>
523<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
524&nbsp;PREV CLASS&nbsp;
525&nbsp;<A HREF="../../../../com/rabbitmq/tools/jsonrpc/JsonRpcException.html" title="class in com.rabbitmq.tools.jsonrpc"><B>NEXT CLASS</B></A></FONT></TD>
526<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
527  <A HREF="../../../../index.html?com/rabbitmq/tools/jsonrpc/JsonRpcClient.html" target="_top"><B>FRAMES</B></A>  &nbsp;
528&nbsp;<A HREF="JsonRpcClient.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
529&nbsp;<SCRIPT type="text/javascript">
530  <!--
531  if(window==top) {
532    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
533  }
534  //-->
535</SCRIPT>
536<NOSCRIPT>
537  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
538</NOSCRIPT>
539
540
541</FONT></TD>
542</TR>
543<TR>
544<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
545  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.rabbitmq.client.RpcClient">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
546<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
547DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
548</TR>
549</TABLE>
550<A NAME="skip-navbar_bottom"></A>
551<!-- ======== END OF BOTTOM NAVBAR ======= -->
552
553<HR>
554
555</BODY>
556</HTML>
Note: See TracBrowser for help on using the repository browser.