source: branches/objectmq-1.0/lib/rabbitmq-java-client-javadoc-3.0.1/com/rabbitmq/client/RpcClient.html @ 33

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

new release version

File size: 32.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>
7RpcClient
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="RpcClient";
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/client/ReturnListener.html" title="interface in com.rabbitmq.client"><B>PREV CLASS</B></A>&nbsp;
58&nbsp;<A HREF="../../../com/rabbitmq/client/RpcServer.html" title="class in com.rabbitmq.client"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60  <A HREF="../../../index.html?com/rabbitmq/client/RpcClient.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="RpcClient.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.client</FONT>
91<BR>
92Class RpcClient</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.client.RpcClient</B>
96</PRE>
97<DL>
98<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/rabbitmq/tools/jsonrpc/JsonRpcClient.html" title="class in com.rabbitmq.tools.jsonrpc">JsonRpcClient</A></DD>
99</DL>
100<HR>
101<DL>
102<DT><PRE>public class <B>RpcClient</B><DT>extends java.lang.Object</DL>
103</PRE>
104
105<P>
106Convenience class which manages a temporary reply queue for simple RPC-style communication.
107 The class is agnostic about the format of RPC arguments / return values.
108 It simply provides a mechanism for sending a message to an exchange with a given routing key,
109 and waiting for a response on a reply queue.
110<P>
111
112<P>
113<HR>
114
115<P>
116<!-- =========== FIELD SUMMARY =========== -->
117
118<A NAME="field_summary"><!-- --></A>
119<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
120<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
121<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
122<B>Field Summary</B></FONT></TH>
123</TR>
124<TR BGCOLOR="white" CLASS="TableRowColor">
125<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
126<CODE>protected static&nbsp;int</CODE></FONT></TD>
127<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#NO_TIMEOUT">NO_TIMEOUT</A></B></CODE>
128
129<BR>
130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NO_TIMEOUT value must match convention on <A HREF="../../../com/rabbitmq/utility/BlockingCell.html#uninterruptibleGet(int)"><CODE>BlockingCell.uninterruptibleGet(int)</CODE></A></TD>
131</TR>
132</TABLE>
133&nbsp;
134<!-- ======== CONSTRUCTOR SUMMARY ======== -->
135
136<A NAME="constructor_summary"><!-- --></A>
137<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
138<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
139<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
140<B>Constructor Summary</B></FONT></TH>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#RpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String)">RpcClient</A></B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
144          java.lang.String&nbsp;exchange,
145          java.lang.String&nbsp;routingKey)</CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new RpcClient that will communicate on the given channel, sending
149 requests to the given exchange with the given routing key.</TD>
150</TR>
151<TR BGCOLOR="white" CLASS="TableRowColor">
152<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#RpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String, int)">RpcClient</A></B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
153          java.lang.String&nbsp;exchange,
154          java.lang.String&nbsp;routingKey,
155          int&nbsp;timeout)</CODE>
156
157<BR>
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new RpcClient that will communicate on the given channel, sending
159 requests to the given exchange with the given routing key.</TD>
160</TR>
161</TABLE>
162&nbsp;
163<!-- ========== METHOD SUMMARY =========== -->
164
165<A NAME="method_summary"><!-- --></A>
166<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
167<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
168<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
169<B>Method Summary</B></FONT></TH>
170</TR>
171<TR BGCOLOR="white" CLASS="TableRowColor">
172<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173<CODE>&nbsp;void</CODE></FONT></TD>
174<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#checkConsumer()">checkConsumer</A></B>()</CODE>
175
176<BR>
177&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Private API - ensures the RpcClient is correctly open.</TD>
178</TR>
179<TR BGCOLOR="white" CLASS="TableRowColor">
180<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181<CODE>&nbsp;void</CODE></FONT></TD>
182<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#close()">close</A></B>()</CODE>
183
184<BR>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Public API - cancels the consumer, thus deleting the temporary queue, and marks the RpcClient as closed.</TD>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189<CODE>&nbsp;<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A></CODE></FONT></TD>
190<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getChannel()">getChannel</A></B>()</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the channel.</TD>
194</TR>
195<TR BGCOLOR="white" CLASS="TableRowColor">
196<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197<CODE>&nbsp;<A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A></CODE></FONT></TD>
198<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getConsumer()">getConsumer</A></B>()</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the consumer.</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../com/rabbitmq/utility/BlockingCell.html" title="class in com.rabbitmq.utility">BlockingCell</A>&lt;java.lang.Object&gt;&gt;</CODE></FONT></TD>
206<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getContinuationMap()">getContinuationMap</A></B>()</CODE>
207
208<BR>
209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the continuation map.</TD>
210</TR>
211<TR BGCOLOR="white" CLASS="TableRowColor">
212<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213<CODE>&nbsp;int</CODE></FONT></TD>
214<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getCorrelationId()">getCorrelationId</A></B>()</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the correlation id.</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
222<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getExchange()">getExchange</A></B>()</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the exchange.</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getReplyQueue()">getReplyQueue</A></B>()</CODE>
231
232<BR>
233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the reply queue.</TD>
234</TR>
235<TR BGCOLOR="white" CLASS="TableRowColor">
236<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
238<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#getRoutingKey()">getRoutingKey</A></B>()</CODE>
239
240<BR>
241&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the routing key.</TD>
242</TR>
243<TR BGCOLOR="white" CLASS="TableRowColor">
244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245<CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.Object&gt;</CODE></FONT></TD>
246<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#mapCall(java.util.Map)">mapCall</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)</CODE>
247
248<BR>
249&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform an AMQP wire-protocol-table based RPC roundtrip <br><br>
250
251 There are some restrictions on the values appearing in the table: <br>
252 they must be of type <CODE>String</CODE>, <A HREF="../../../com/rabbitmq/client/LongString.html" title="interface in com.rabbitmq.client"><CODE>LongString</CODE></A>, <CODE>Integer</CODE>, <CODE>BigDecimal</CODE>, <CODE>Date</CODE>,
253 or (recursively) a <CODE>Map</CODE> of the enclosing type.</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.Object&gt;</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#mapCall(java.lang.Object[])">mapCall</A></B>(java.lang.Object[]&nbsp;keyValuePairs)</CODE>
259
260<BR>
261&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform an AMQP wire-protocol-table based RPC roundtrip, first
262 constructing the table from an array of alternating keys (in
263 even-numbered elements, starting at zero) and values (in
264 odd-numbered elements, starting at one) <br>
265 Restrictions on value arguments apply as in <A HREF="../../../com/rabbitmq/client/RpcClient.html#mapCall(java.util.Map)"><CODE>mapCall(Map)</CODE></A>.</TD>
266</TR>
267<TR BGCOLOR="white" CLASS="TableRowColor">
268<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269<CODE>&nbsp;byte[]</CODE></FONT></TD>
270<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#primitiveCall(com.rabbitmq.client.AMQP.BasicProperties, byte[])">primitiveCall</A></B>(<A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;props,
271              byte[]&nbsp;message)</CODE>
272
273<BR>
274&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278<CODE>&nbsp;byte[]</CODE></FONT></TD>
279<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#primitiveCall(byte[])">primitiveCall</A></B>(byte[]&nbsp;message)</CODE>
280
281<BR>
282&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a simple byte-array-based RPC roundtrip.</TD>
283</TR>
284<TR BGCOLOR="white" CLASS="TableRowColor">
285<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
286<CODE>&nbsp;void</CODE></FONT></TD>
287<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#publish(com.rabbitmq.client.AMQP.BasicProperties, byte[])">publish</A></B>(<A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;props,
288        byte[]&nbsp;message)</CODE>
289
290<BR>
291&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
292</TR>
293<TR BGCOLOR="white" CLASS="TableRowColor">
294<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
295<CODE>protected &nbsp;<A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></CODE></FONT></TD>
296<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#setupConsumer()">setupConsumer</A></B>()</CODE>
297
298<BR>
299&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a consumer on the reply queue.</TD>
300</TR>
301<TR BGCOLOR="white" CLASS="TableRowColor">
302<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
303<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
304<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#setupReplyQueue()">setupReplyQueue</A></B>()</CODE>
305
306<BR>
307&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a server-named exclusive autodelete queue to use for
308 receiving replies to RPC requests.</TD>
309</TR>
310<TR BGCOLOR="white" CLASS="TableRowColor">
311<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
313<TD><CODE><B><A HREF="../../../com/rabbitmq/client/RpcClient.html#stringCall(java.lang.String)">stringCall</A></B>(java.lang.String&nbsp;message)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a simple string-based RPC roundtrip.</TD>
317</TR>
318</TABLE>
319&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
320<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
321<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
322<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
323</TR>
324<TR BGCOLOR="white" CLASS="TableRowColor">
325<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
326</TR>
327</TABLE>
328&nbsp;
329<P>
330
331<!-- ============ FIELD DETAIL =========== -->
332
333<A NAME="field_detail"><!-- --></A>
334<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
335<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
336<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
337<B>Field Detail</B></FONT></TH>
338</TR>
339</TABLE>
340
341<A NAME="NO_TIMEOUT"><!-- --></A><H3>
342NO_TIMEOUT</H3>
343<PRE>
344protected static final int <B>NO_TIMEOUT</B></PRE>
345<DL>
346<DD>NO_TIMEOUT value must match convention on <A HREF="../../../com/rabbitmq/utility/BlockingCell.html#uninterruptibleGet(int)"><CODE>BlockingCell.uninterruptibleGet(int)</CODE></A>
347<P>
348<DL>
349<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.rabbitmq.client.RpcClient.NO_TIMEOUT">Constant Field Values</A></DL>
350</DL>
351
352<!-- ========= CONSTRUCTOR DETAIL ======== -->
353
354<A NAME="constructor_detail"><!-- --></A>
355<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
356<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
357<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
358<B>Constructor Detail</B></FONT></TH>
359</TR>
360</TABLE>
361
362<A NAME="RpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String, int)"><!-- --></A><H3>
363RpcClient</H3>
364<PRE>
365public <B>RpcClient</B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
366                 java.lang.String&nbsp;exchange,
367                 java.lang.String&nbsp;routingKey,
368                 int&nbsp;timeout)
369          throws java.io.IOException</PRE>
370<DL>
371<DD>Construct a new RpcClient that will communicate on the given channel, sending
372 requests to the given exchange with the given routing key.
373 <p/>
374 Causes the creation of a temporary private autodelete queue.
375<P>
376<DL>
377<DT><B>Parameters:</B><DD><CODE>channel</CODE> - the channel to use for communication<DD><CODE>exchange</CODE> - the exchange to connect to<DD><CODE>routingKey</CODE> - the routing key<DD><CODE>timeout</CODE> - milliseconds before timing out on wait for response
378<DT><B>Throws:</B>
379<DD><CODE>java.io.IOException</CODE> - if an error is encountered<DT><B>See Also:</B><DD><A HREF="../../../com/rabbitmq/client/RpcClient.html#setupReplyQueue()"><CODE>setupReplyQueue()</CODE></A></DL>
380</DL>
381<HR>
382
383<A NAME="RpcClient(com.rabbitmq.client.Channel, java.lang.String, java.lang.String)"><!-- --></A><H3>
384RpcClient</H3>
385<PRE>
386public <B>RpcClient</B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;channel,
387                 java.lang.String&nbsp;exchange,
388                 java.lang.String&nbsp;routingKey)
389          throws java.io.IOException</PRE>
390<DL>
391<DD>Construct a new RpcClient that will communicate on the given channel, sending
392 requests to the given exchange with the given routing key.
393 <p/>
394 Causes the creation of a temporary private autodelete queue.
395 <p/>
396 Waits forever for responses (that is, no timeout).
397<P>
398<DL>
399<DT><B>Parameters:</B><DD><CODE>channel</CODE> - the channel to use for communication<DD><CODE>exchange</CODE> - the exchange to connect to<DD><CODE>routingKey</CODE> - the routing key
400<DT><B>Throws:</B>
401<DD><CODE>java.io.IOException</CODE> - if an error is encountered<DT><B>See Also:</B><DD><A HREF="../../../com/rabbitmq/client/RpcClient.html#setupReplyQueue()"><CODE>setupReplyQueue()</CODE></A></DL>
402</DL>
403
404<!-- ============ METHOD DETAIL ========== -->
405
406<A NAME="method_detail"><!-- --></A>
407<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
408<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
409<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
410<B>Method Detail</B></FONT></TH>
411</TR>
412</TABLE>
413
414<A NAME="checkConsumer()"><!-- --></A><H3>
415checkConsumer</H3>
416<PRE>
417public void <B>checkConsumer</B>()
418                   throws java.io.IOException</PRE>
419<DL>
420<DD>Private API - ensures the RpcClient is correctly open.
421<P>
422<DD><DL>
423
424<DT><B>Throws:</B>
425<DD><CODE>java.io.IOException</CODE> - if an error is encountered</DL>
426</DD>
427</DL>
428<HR>
429
430<A NAME="close()"><!-- --></A><H3>
431close</H3>
432<PRE>
433public void <B>close</B>()
434           throws java.io.IOException</PRE>
435<DL>
436<DD>Public API - cancels the consumer, thus deleting the temporary queue, and marks the RpcClient as closed.
437<P>
438<DD><DL>
439
440<DT><B>Throws:</B>
441<DD><CODE>java.io.IOException</CODE> - if an error is encountered</DL>
442</DD>
443</DL>
444<HR>
445
446<A NAME="setupReplyQueue()"><!-- --></A><H3>
447setupReplyQueue</H3>
448<PRE>
449protected java.lang.String <B>setupReplyQueue</B>()
450                                    throws java.io.IOException</PRE>
451<DL>
452<DD>Creates a server-named exclusive autodelete queue to use for
453 receiving replies to RPC requests.
454<P>
455<DD><DL>
456
457<DT><B>Returns:</B><DD>the name of the reply queue
458<DT><B>Throws:</B>
459<DD><CODE>java.io.IOException</CODE> - if an error is encountered</DL>
460</DD>
461</DL>
462<HR>
463
464<A NAME="setupConsumer()"><!-- --></A><H3>
465setupConsumer</H3>
466<PRE>
467protected <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A> <B>setupConsumer</B>()
468                                 throws java.io.IOException</PRE>
469<DL>
470<DD>Registers a consumer on the reply queue.
471<P>
472<DD><DL>
473
474<DT><B>Returns:</B><DD>the newly created and registered consumer
475<DT><B>Throws:</B>
476<DD><CODE>java.io.IOException</CODE> - if an error is encountered</DL>
477</DD>
478</DL>
479<HR>
480
481<A NAME="publish(com.rabbitmq.client.AMQP.BasicProperties, byte[])"><!-- --></A><H3>
482publish</H3>
483<PRE>
484public void <B>publish</B>(<A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;props,
485                    byte[]&nbsp;message)
486             throws java.io.IOException</PRE>
487<DL>
488<DD><DL>
489
490<DT><B>Throws:</B>
491<DD><CODE>java.io.IOException</CODE></DL>
492</DD>
493</DL>
494<HR>
495
496<A NAME="primitiveCall(com.rabbitmq.client.AMQP.BasicProperties, byte[])"><!-- --></A><H3>
497primitiveCall</H3>
498<PRE>
499public byte[] <B>primitiveCall</B>(<A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;props,
500                            byte[]&nbsp;message)
501                     throws java.io.IOException,
502                            <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
503                            java.util.concurrent.TimeoutException</PRE>
504<DL>
505<DD><DL>
506
507<DT><B>Throws:</B>
508<DD><CODE>java.io.IOException</CODE>
509<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE>
510<DD><CODE>java.util.concurrent.TimeoutException</CODE></DL>
511</DD>
512</DL>
513<HR>
514
515<A NAME="primitiveCall(byte[])"><!-- --></A><H3>
516primitiveCall</H3>
517<PRE>
518public byte[] <B>primitiveCall</B>(byte[]&nbsp;message)
519                     throws java.io.IOException,
520                            <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
521                            java.util.concurrent.TimeoutException</PRE>
522<DL>
523<DD>Perform a simple byte-array-based RPC roundtrip.
524<P>
525<DD><DL>
526<DT><B>Parameters:</B><DD><CODE>message</CODE> - the byte array request message to send
527<DT><B>Returns:</B><DD>the byte array response received
528<DT><B>Throws:</B>
529<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection dies during our wait
530<DD><CODE>java.io.IOException</CODE> - if an error is encountered
531<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a response is not received within the configured timeout</DL>
532</DD>
533</DL>
534<HR>
535
536<A NAME="stringCall(java.lang.String)"><!-- --></A><H3>
537stringCall</H3>
538<PRE>
539public java.lang.String <B>stringCall</B>(java.lang.String&nbsp;message)
540                            throws java.io.IOException,
541                                   <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
542                                   java.util.concurrent.TimeoutException</PRE>
543<DL>
544<DD>Perform a simple string-based RPC roundtrip.
545<P>
546<DD><DL>
547<DT><B>Parameters:</B><DD><CODE>message</CODE> - the string request message to send
548<DT><B>Returns:</B><DD>the string response received
549<DT><B>Throws:</B>
550<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection dies during our wait
551<DD><CODE>java.io.IOException</CODE> - if an error is encountered
552<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a timeout occurs before the response is received</DL>
553</DD>
554</DL>
555<HR>
556
557<A NAME="mapCall(java.util.Map)"><!-- --></A><H3>
558mapCall</H3>
559<PRE>
560public java.util.Map&lt;java.lang.String,java.lang.Object&gt; <B>mapCall</B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)
561                                                         throws java.io.IOException,
562                                                                <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
563                                                                java.util.concurrent.TimeoutException</PRE>
564<DL>
565<DD>Perform an AMQP wire-protocol-table based RPC roundtrip <br><br>
566
567 There are some restrictions on the values appearing in the table: <br>
568 they must be of type <CODE>String</CODE>, <A HREF="../../../com/rabbitmq/client/LongString.html" title="interface in com.rabbitmq.client"><CODE>LongString</CODE></A>, <CODE>Integer</CODE>, <CODE>BigDecimal</CODE>, <CODE>Date</CODE>,
569 or (recursively) a <CODE>Map</CODE> of the enclosing type.
570<P>
571<DD><DL>
572<DT><B>Parameters:</B><DD><CODE>message</CODE> - the table to send
573<DT><B>Returns:</B><DD>the table received
574<DT><B>Throws:</B>
575<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection dies during our wait
576<DD><CODE>java.io.IOException</CODE> - if an error is encountered
577<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a timeout occurs before a response is received</DL>
578</DD>
579</DL>
580<HR>
581
582<A NAME="mapCall(java.lang.Object[])"><!-- --></A><H3>
583mapCall</H3>
584<PRE>
585public java.util.Map&lt;java.lang.String,java.lang.Object&gt; <B>mapCall</B>(java.lang.Object[]&nbsp;keyValuePairs)
586                                                         throws java.io.IOException,
587                                                                <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
588                                                                java.util.concurrent.TimeoutException</PRE>
589<DL>
590<DD>Perform an AMQP wire-protocol-table based RPC roundtrip, first
591 constructing the table from an array of alternating keys (in
592 even-numbered elements, starting at zero) and values (in
593 odd-numbered elements, starting at one) <br>
594 Restrictions on value arguments apply as in <A HREF="../../../com/rabbitmq/client/RpcClient.html#mapCall(java.util.Map)"><CODE>mapCall(Map)</CODE></A>.
595<P>
596<DD><DL>
597<DT><B>Parameters:</B><DD><CODE>keyValuePairs</CODE> - alternating {key, value, key, value, ...} data to send
598<DT><B>Returns:</B><DD>the table received
599<DT><B>Throws:</B>
600<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection dies during our wait
601<DD><CODE>java.io.IOException</CODE> - if an error is encountered
602<DD><CODE>java.util.concurrent.TimeoutException</CODE> - if a timeout occurs before a response is received</DL>
603</DD>
604</DL>
605<HR>
606
607<A NAME="getChannel()"><!-- --></A><H3>
608getChannel</H3>
609<PRE>
610public <A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A> <B>getChannel</B>()</PRE>
611<DL>
612<DD>Retrieve the channel.
613<P>
614<DD><DL>
615
616<DT><B>Returns:</B><DD>the channel to which this client is connected</DL>
617</DD>
618</DL>
619<HR>
620
621<A NAME="getExchange()"><!-- --></A><H3>
622getExchange</H3>
623<PRE>
624public java.lang.String <B>getExchange</B>()</PRE>
625<DL>
626<DD>Retrieve the exchange.
627<P>
628<DD><DL>
629
630<DT><B>Returns:</B><DD>the exchange to which this client is connected</DL>
631</DD>
632</DL>
633<HR>
634
635<A NAME="getRoutingKey()"><!-- --></A><H3>
636getRoutingKey</H3>
637<PRE>
638public java.lang.String <B>getRoutingKey</B>()</PRE>
639<DL>
640<DD>Retrieve the routing key.
641<P>
642<DD><DL>
643
644<DT><B>Returns:</B><DD>the routing key for messages to this client</DL>
645</DD>
646</DL>
647<HR>
648
649<A NAME="getContinuationMap()"><!-- --></A><H3>
650getContinuationMap</H3>
651<PRE>
652public java.util.Map&lt;java.lang.String,<A HREF="../../../com/rabbitmq/utility/BlockingCell.html" title="class in com.rabbitmq.utility">BlockingCell</A>&lt;java.lang.Object&gt;&gt; <B>getContinuationMap</B>()</PRE>
653<DL>
654<DD>Retrieve the continuation map.
655<P>
656<DD><DL>
657
658<DT><B>Returns:</B><DD>the map of objects to blocking cells for this client</DL>
659</DD>
660</DL>
661<HR>
662
663<A NAME="getCorrelationId()"><!-- --></A><H3>
664getCorrelationId</H3>
665<PRE>
666public int <B>getCorrelationId</B>()</PRE>
667<DL>
668<DD>Retrieve the correlation id.
669<P>
670<DD><DL>
671
672<DT><B>Returns:</B><DD>the most recently used correlation id</DL>
673</DD>
674</DL>
675<HR>
676
677<A NAME="getReplyQueue()"><!-- --></A><H3>
678getReplyQueue</H3>
679<PRE>
680public java.lang.String <B>getReplyQueue</B>()</PRE>
681<DL>
682<DD>Retrieve the reply queue.
683<P>
684<DD><DL>
685
686<DT><B>Returns:</B><DD>the name of the client's reply queue</DL>
687</DD>
688</DL>
689<HR>
690
691<A NAME="getConsumer()"><!-- --></A><H3>
692getConsumer</H3>
693<PRE>
694public <A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A> <B>getConsumer</B>()</PRE>
695<DL>
696<DD>Retrieve the consumer.
697<P>
698<DD><DL>
699
700<DT><B>Returns:</B><DD>an interface to the client's consumer object</DL>
701</DD>
702</DL>
703<!-- ========= END OF CLASS DATA ========= -->
704<HR>
705
706
707<!-- ======= START OF BOTTOM NAVBAR ====== -->
708<A NAME="navbar_bottom"><!-- --></A>
709<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
710<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
711<TR>
712<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
713<A NAME="navbar_bottom_firstrow"><!-- --></A>
714<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
715  <TR ALIGN="center" VALIGN="top">
716  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
717  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
718  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
719  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
720  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
721  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
722  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
723  </TR>
724</TABLE>
725</TD>
726<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
727</EM>
728</TD>
729</TR>
730
731<TR>
732<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
733&nbsp;<A HREF="../../../com/rabbitmq/client/ReturnListener.html" title="interface in com.rabbitmq.client"><B>PREV CLASS</B></A>&nbsp;
734&nbsp;<A HREF="../../../com/rabbitmq/client/RpcServer.html" title="class in com.rabbitmq.client"><B>NEXT CLASS</B></A></FONT></TD>
735<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
736  <A HREF="../../../index.html?com/rabbitmq/client/RpcClient.html" target="_top"><B>FRAMES</B></A>  &nbsp;
737&nbsp;<A HREF="RpcClient.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
738&nbsp;<SCRIPT type="text/javascript">
739  <!--
740  if(window==top) {
741    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
742  }
743  //-->
744</SCRIPT>
745<NOSCRIPT>
746  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
747</NOSCRIPT>
748
749
750</FONT></TD>
751</TR>
752<TR>
753<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
754  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>
755<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
756DETAIL:&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>
757</TR>
758</TABLE>
759<A NAME="skip-navbar_bottom"></A>
760<!-- ======== END OF BOTTOM NAVBAR ======= -->
761
762<HR>
763
764</BODY>
765</HTML>
Note: See TracBrowser for help on using the repository browser.