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

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

new release version

File size: 28.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:09 GMT 2012 -->
6<TITLE>
7QueueingConsumer
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="QueueingConsumer";
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/ProtocolVersionMismatchException.html" title="class in com.rabbitmq.client"><B>PREV CLASS</B></A>&nbsp;
58&nbsp;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.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/QueueingConsumer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="QueueingConsumer.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&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.client</FONT>
91<BR>
92Class QueueingConsumer</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">com.rabbitmq.client.DefaultConsumer</A>
96      <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.client.QueueingConsumer</B>
97</PRE>
98<DL>
99<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A></DD>
100</DL>
101<HR>
102<DL>
103<DT><PRE>public class <B>QueueingConsumer</B><DT>extends <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></DL>
104</PRE>
105
106<P>
107Convenience class: an implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client"><CODE>Consumer</CODE></A> with
108 straightforward blocking semantics.
109
110 The general pattern for using QueueingConsumer is as follows:
111
112 <pre>
113 // Create connection and channel.
114 <A HREF="../../../com/rabbitmq/client/ConnectionFactory.html" title="class in com.rabbitmq.client"><CODE>ConnectionFactory</CODE></A> factory = new ConnectionFactory();
115 Connection conn = factory.newConnection();
116 <A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client"><CODE>Channel</CODE></A> ch1 = conn.createChannel();
117
118 // Declare a queue and bind it to an exchange.
119 String queueName = ch1.queueDeclare().<A HREF="../../../com/rabbitmq/client/AMQP.Queue.DeclareOk.html#getQueue()"><CODE>getQueue</CODE></A>();
120 ch1.<A HREF="../../../com/rabbitmq/client/Channel.html#queueBind(java.lang.String, java.lang.String, java.lang.String)"><CODE>queueBind</CODE></A>(queueName, exchangeName, queueName);
121
122 // Create the QueueingConsumer and have it consume from the queue
123 QueueingConsumer consumer = new <A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#QueueingConsumer(com.rabbitmq.client.Channel)"><CODE>QueueingConsumer</CODE></A>(ch1);
124 ch1.<A HREF="../../../com/rabbitmq/client/Channel.html#basicConsume(java.lang.String, com.rabbitmq.client.Consumer)"><CODE>basicConsume</CODE></A>(queueName, false, consumer);
125
126 // Process deliveries
127 while (/* some condition * /) {
128     <A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client"><CODE>QueueingConsumer.Delivery</CODE></A> delivery = consumer.<A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#nextDelivery()"><CODE>nextDelivery</CODE></A>();
129     // process delivery
130     ch1.<A HREF="../../../com/rabbitmq/client/Channel.html#basicAck(long, boolean)"><CODE>basicAck</CODE></A>(delivery.<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html#getEnvelope()"><CODE>getEnvelope</CODE></A>().<A HREF="../../../com/rabbitmq/client/Envelope.html#getDeliveryTag()"><CODE>getDeliveryTag</CODE></A>(), false);
131 }
132 </pre>
133
134
135 <p>For a more complete example, see LogTail in the <code>test/src/com/rabbitmq/examples</code>
136 directory of the source distribution.</p>
137 <p/>
138 <b>deprecated</b> <i><code>QueueingConsumer</code> was introduced to allow
139 applications to overcome a limitation in the way <code>Connection</code>
140 managed threads and consumer dispatching. When <code>QueueingConsumer</code>
141 was introduced, callbacks to <code>Consumers</code> were made on the
142 <code>Connection's</code> thread. This had two main drawbacks. Firstly, the
143 <code>Consumer</code> could stall the processing of all
144 <code>Channels</code> on the <code>Connection</code>. Secondly, if a
145 <code>Consumer</code> made a recursive synchronous call into its
146 <code>Channel</code> the client would deadlock.
147 <p/>
148 <code>QueueingConsumer</code> provided client code with an easy way to
149 obviate this problem by queueing incoming messages and processing them on
150 a separate, application-managed thread.
151 <p/>
152 The threading behaviour of <code>Connection</code> and <code>Channel</code>
153 has been changed so that each <code>Channel</code> uses a distinct thread
154 for dispatching to <code>Consumers</code>. This prevents
155 <code>Consumers</code> on one <code>Channel</code> holding up
156 <code>Consumers</code> on another and it also prevents recursive calls from
157 deadlocking the client.
158 <p/>
159 As such, it is now safe to implement <code>Consumer</code> directly or
160 to extend <code>DefaultConsumer</code>.</i>
161<P>
162
163<P>
164<HR>
165
166<P>
167<!-- ======== NESTED CLASS SUMMARY ======== -->
168
169<A NAME="nested_class_summary"><!-- --></A>
170<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
171<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
172<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
173<B>Nested Class Summary</B></FONT></TH>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177<CODE>static&nbsp;class</CODE></FONT></TD>
178<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A></B></CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encapsulates an arbitrary message - simple "bean" holder structure.</TD>
182</TR>
183</TABLE>
184&nbsp;
185<!-- ======== CONSTRUCTOR SUMMARY ======== -->
186
187<A NAME="constructor_summary"><!-- --></A>
188<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
189<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
190<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
191<B>Constructor Summary</B></FONT></TH>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#QueueingConsumer(com.rabbitmq.client.Channel)">QueueingConsumer</A></B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;ch)</CODE>
195
196<BR>
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#QueueingConsumer(com.rabbitmq.client.Channel, java.util.concurrent.BlockingQueue)">QueueingConsumer</A></B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;ch,
201                 java.util.concurrent.BlockingQueue&lt;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A>&gt;&nbsp;q)</CODE>
202
203<BR>
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
205</TR>
206</TABLE>
207&nbsp;
208<!-- ========== METHOD SUMMARY =========== -->
209
210<A NAME="method_summary"><!-- --></A>
211<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
212<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
213<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
214<B>Method Summary</B></FONT></TH>
215</TR>
216<TR BGCOLOR="white" CLASS="TableRowColor">
217<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218<CODE>&nbsp;void</CODE></FONT></TD>
219<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#handleCancel(java.lang.String)">handleCancel</A></B>(java.lang.String&nbsp;consumerTag)</CODE>
220
221<BR>
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleCancel(java.lang.String)"><CODE>Consumer.handleCancel(String)</CODE></A></TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>&nbsp;void</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])">handleDelivery</A></B>(java.lang.String&nbsp;consumerTag,
228               <A HREF="../../../com/rabbitmq/client/Envelope.html" title="class in com.rabbitmq.client">Envelope</A>&nbsp;envelope,
229               <A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;properties,
230               byte[]&nbsp;body)</CODE>
231
232<BR>
233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])"><CODE>Consumer.handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])</CODE></A>.</TD>
234</TR>
235<TR BGCOLOR="white" CLASS="TableRowColor">
236<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237<CODE>&nbsp;void</CODE></FONT></TD>
238<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)">handleShutdownSignal</A></B>(java.lang.String&nbsp;consumerTag,
239                     <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>&nbsp;sig)</CODE>
240
241<BR>
242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)"><CODE>Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)</CODE></A>.</TD>
243</TR>
244<TR BGCOLOR="white" CLASS="TableRowColor">
245<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
246<CODE>&nbsp;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A></CODE></FONT></TD>
247<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#nextDelivery()">nextDelivery</A></B>()</CODE>
248
249<BR>
250&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Main application-side API: wait for the next message delivery and return it.</TD>
251</TR>
252<TR BGCOLOR="white" CLASS="TableRowColor">
253<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
254<CODE>&nbsp;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A></CODE></FONT></TD>
255<TD><CODE><B><A HREF="../../../com/rabbitmq/client/QueueingConsumer.html#nextDelivery(long)">nextDelivery</A></B>(long&nbsp;timeout)</CODE>
256
257<BR>
258&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Main application-side API: wait for the next message delivery and return it.</TD>
259</TR>
260</TABLE>
261&nbsp;<A NAME="methods_inherited_from_class_com.rabbitmq.client.DefaultConsumer"><!-- --></A>
262<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
263<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
264<TH ALIGN="left"><B>Methods inherited from class com.rabbitmq.client.<A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></B></TH>
265</TR>
266<TR BGCOLOR="white" CLASS="TableRowColor">
267<TD><CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#getChannel()">getChannel</A>, <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#getConsumerTag()">getConsumerTag</A>, <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleCancelOk(java.lang.String)">handleCancelOk</A>, <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleConsumeOk(java.lang.String)">handleConsumeOk</A>, <A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleRecoverOk(java.lang.String)">handleRecoverOk</A></CODE></TD>
268</TR>
269</TABLE>
270&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
271<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
272<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
273<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
274</TR>
275<TR BGCOLOR="white" CLASS="TableRowColor">
276<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
277</TR>
278</TABLE>
279&nbsp;
280<P>
281
282<!-- ========= CONSTRUCTOR DETAIL ======== -->
283
284<A NAME="constructor_detail"><!-- --></A>
285<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
287<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
288<B>Constructor Detail</B></FONT></TH>
289</TR>
290</TABLE>
291
292<A NAME="QueueingConsumer(com.rabbitmq.client.Channel)"><!-- --></A><H3>
293QueueingConsumer</H3>
294<PRE>
295public <B>QueueingConsumer</B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;ch)</PRE>
296<DL>
297</DL>
298<HR>
299
300<A NAME="QueueingConsumer(com.rabbitmq.client.Channel, java.util.concurrent.BlockingQueue)"><!-- --></A><H3>
301QueueingConsumer</H3>
302<PRE>
303public <B>QueueingConsumer</B>(<A HREF="../../../com/rabbitmq/client/Channel.html" title="interface in com.rabbitmq.client">Channel</A>&nbsp;ch,
304                        java.util.concurrent.BlockingQueue&lt;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A>&gt;&nbsp;q)</PRE>
305<DL>
306</DL>
307
308<!-- ============ METHOD DETAIL ========== -->
309
310<A NAME="method_detail"><!-- --></A>
311<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
312<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
313<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
314<B>Method Detail</B></FONT></TH>
315</TR>
316</TABLE>
317
318<A NAME="handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)"><!-- --></A><H3>
319handleShutdownSignal</H3>
320<PRE>
321public void <B>handleShutdownSignal</B>(java.lang.String&nbsp;consumerTag,
322                                 <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>&nbsp;sig)</PRE>
323<DL>
324<DD><B>Description copied from class: <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)">DefaultConsumer</A></CODE></B></DD>
325<DD>No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)"><CODE>Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)</CODE></A>.
326<P>
327<DD><DL>
328<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/Consumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)">handleShutdownSignal</A></CODE> in interface <CODE><A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)">handleShutdownSignal</A></CODE> in class <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></CODE></DL>
329</DD>
330<DD><DL>
331<DT><B>Parameters:</B><DD><CODE>consumerTag</CODE> - the <i>consumer tag</i> associated with the consumer<DD><CODE>sig</CODE> - a <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client"><CODE>ShutdownSignalException</CODE></A> indicating the reason for the shut down</DL>
332</DD>
333</DL>
334<HR>
335
336<A NAME="handleCancel(java.lang.String)"><!-- --></A><H3>
337handleCancel</H3>
338<PRE>
339public void <B>handleCancel</B>(java.lang.String&nbsp;consumerTag)
340                  throws java.io.IOException</PRE>
341<DL>
342<DD><B>Description copied from class: <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleCancel(java.lang.String)">DefaultConsumer</A></CODE></B></DD>
343<DD>No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleCancel(java.lang.String)"><CODE>Consumer.handleCancel(String)</CODE></A>
344<P>
345<DD><DL>
346<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/Consumer.html#handleCancel(java.lang.String)">handleCancel</A></CODE> in interface <CODE><A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleCancel(java.lang.String)">handleCancel</A></CODE> in class <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></CODE></DL>
347</DD>
348<DD><DL>
349<DT><B>Parameters:</B><DD><CODE>consumerTag</CODE> - the defined consumer tag (client- or server-generated)
350<DT><B>Throws:</B>
351<DD><CODE>java.io.IOException</CODE></DL>
352</DD>
353</DL>
354<HR>
355
356<A NAME="handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])"><!-- --></A><H3>
357handleDelivery</H3>
358<PRE>
359public void <B>handleDelivery</B>(java.lang.String&nbsp;consumerTag,
360                           <A HREF="../../../com/rabbitmq/client/Envelope.html" title="class in com.rabbitmq.client">Envelope</A>&nbsp;envelope,
361                           <A HREF="../../../com/rabbitmq/client/AMQP.BasicProperties.html" title="class in com.rabbitmq.client">AMQP.BasicProperties</A>&nbsp;properties,
362                           byte[]&nbsp;body)
363                    throws java.io.IOException</PRE>
364<DL>
365<DD><B>Description copied from class: <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])">DefaultConsumer</A></CODE></B></DD>
366<DD>No-op implementation of <A HREF="../../../com/rabbitmq/client/Consumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])"><CODE>Consumer.handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])</CODE></A>.
367<P>
368<DD><DL>
369<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/Consumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])">handleDelivery</A></CODE> in interface <CODE><A HREF="../../../com/rabbitmq/client/Consumer.html" title="interface in com.rabbitmq.client">Consumer</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html#handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[])">handleDelivery</A></CODE> in class <CODE><A HREF="../../../com/rabbitmq/client/DefaultConsumer.html" title="class in com.rabbitmq.client">DefaultConsumer</A></CODE></DL>
370</DD>
371<DD><DL>
372<DT><B>Parameters:</B><DD><CODE>consumerTag</CODE> - the <i>consumer tag</i> associated with the consumer<DD><CODE>envelope</CODE> - packaging data for the message<DD><CODE>properties</CODE> - content header data for the message<DD><CODE>body</CODE> - the message body (opaque, client-specific byte array)
373<DT><B>Throws:</B>
374<DD><CODE>java.io.IOException</CODE> - if the consumer encounters an I/O error while processing the message<DT><B>See Also:</B><DD><A HREF="../../../com/rabbitmq/client/Envelope.html" title="class in com.rabbitmq.client"><CODE>Envelope</CODE></A></DL>
375</DD>
376</DL>
377<HR>
378
379<A NAME="nextDelivery()"><!-- --></A><H3>
380nextDelivery</H3>
381<PRE>
382public <A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A> <B>nextDelivery</B>()
383                                       throws java.lang.InterruptedException,
384                                              <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
385                                              <A HREF="../../../com/rabbitmq/client/ConsumerCancelledException.html" title="class in com.rabbitmq.client">ConsumerCancelledException</A></PRE>
386<DL>
387<DD>Main application-side API: wait for the next message delivery and return it.
388<P>
389<DD><DL>
390
391<DT><B>Returns:</B><DD>the next message
392<DT><B>Throws:</B>
393<DD><CODE>java.lang.InterruptedException</CODE> - if an interrupt is received while waiting
394<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection is shut down while waiting
395<DD><CODE><A HREF="../../../com/rabbitmq/client/ConsumerCancelledException.html" title="class in com.rabbitmq.client">ConsumerCancelledException</A></CODE> - if this consumer is cancelled while waiting</DL>
396</DD>
397</DL>
398<HR>
399
400<A NAME="nextDelivery(long)"><!-- --></A><H3>
401nextDelivery</H3>
402<PRE>
403public <A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client">QueueingConsumer.Delivery</A> <B>nextDelivery</B>(long&nbsp;timeout)
404                                       throws java.lang.InterruptedException,
405                                              <A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A>,
406                                              <A HREF="../../../com/rabbitmq/client/ConsumerCancelledException.html" title="class in com.rabbitmq.client">ConsumerCancelledException</A></PRE>
407<DL>
408<DD>Main application-side API: wait for the next message delivery and return it.
409<P>
410<DD><DL>
411<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - timeout in millisecond
412<DT><B>Returns:</B><DD>the next message or null if timed out
413<DT><B>Throws:</B>
414<DD><CODE>java.lang.InterruptedException</CODE> - if an interrupt is received while waiting
415<DD><CODE><A HREF="../../../com/rabbitmq/client/ShutdownSignalException.html" title="class in com.rabbitmq.client">ShutdownSignalException</A></CODE> - if the connection is shut down while waiting
416<DD><CODE><A HREF="../../../com/rabbitmq/client/ConsumerCancelledException.html" title="class in com.rabbitmq.client">ConsumerCancelledException</A></CODE> - if this consumer is cancelled while waiting</DL>
417</DD>
418</DL>
419<!-- ========= END OF CLASS DATA ========= -->
420<HR>
421
422
423<!-- ======= START OF BOTTOM NAVBAR ====== -->
424<A NAME="navbar_bottom"><!-- --></A>
425<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
426<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
427<TR>
428<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
429<A NAME="navbar_bottom_firstrow"><!-- --></A>
430<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
431  <TR ALIGN="center" VALIGN="top">
432  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
433  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
434  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
435  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
436  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
437  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
438  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
439  </TR>
440</TABLE>
441</TD>
442<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
443</EM>
444</TD>
445</TR>
446
447<TR>
448<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
449&nbsp;<A HREF="../../../com/rabbitmq/client/ProtocolVersionMismatchException.html" title="class in com.rabbitmq.client"><B>PREV CLASS</B></A>&nbsp;
450&nbsp;<A HREF="../../../com/rabbitmq/client/QueueingConsumer.Delivery.html" title="class in com.rabbitmq.client"><B>NEXT CLASS</B></A></FONT></TD>
451<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
452  <A HREF="../../../index.html?com/rabbitmq/client/QueueingConsumer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
453&nbsp;<A HREF="QueueingConsumer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
454&nbsp;<SCRIPT type="text/javascript">
455  <!--
456  if(window==top) {
457    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
458  }
459  //-->
460</SCRIPT>
461<NOSCRIPT>
462  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
463</NOSCRIPT>
464
465
466</FONT></TD>
467</TR>
468<TR>
469<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
470  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
471<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
472DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
473</TR>
474</TABLE>
475<A NAME="skip-navbar_bottom"></A>
476<!-- ======== END OF BOTTOM NAVBAR ======= -->
477
478<HR>
479
480</BODY>
481</HTML>
Note: See TracBrowser for help on using the repository browser.