Skip to content

Commit c9942b1

Browse files
author
Steve Powell
committed
Properly remove checkShutdown() and fix some JavaDoc bugs.
1 parent 82d0293 commit c9942b1

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/com/rabbitmq/client/QueueingConsumer.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* ch1.{@link Channel#queueBind queueBind}(queueName, exchangeName, queueName);
4343
*
4444
* // Create the QueueingConsumer and have it consume from the queue
45-
* QueueingConsumer consumer = new {@link QueueingConsumer#QueueingConsumer QueueingConsumer}(ch1);
45+
* QueueingConsumer consumer = new {@link QueueingConsumer#QueueingConsumer(Channel) QueueingConsumer}(ch1);
4646
* ch1.{@link Channel#basicConsume basicConsume}(queueName, false, consumer);
4747
*
4848
* // Process deliveries
@@ -54,7 +54,7 @@
5454
* </pre>
5555
*
5656
*
57-
* <p>For a more complete example, see LogTail in the test/src/com/rabbitmq/examples
57+
* <p>For a more complete example, see LogTail in the <code>test/src/com/rabbitmq/examples</code>
5858
* directory of the source distribution.</p>
5959
* <p/>
6060
* <b>deprecated</b> <i><code>QueueingConsumer</code> was introduced to allow
@@ -121,7 +121,6 @@ public QueueingConsumer(Channel ch, BlockingQueue<Delivery> q) {
121121
byte[] body)
122122
throws IOException
123123
{
124-
// checkShutdown();
125124
this._queue.add(new Delivery(envelope, properties, body));
126125
}
127126

@@ -164,14 +163,6 @@ public byte[] getBody() {
164163
}
165164
}
166165

167-
/**
168-
* Check if we are in shutdown mode and if so throw an exception.
169-
*/
170-
private void checkShutdown() {
171-
if (_shutdown != null)
172-
throw Utility.fixStackTrace(_shutdown);
173-
}
174-
175166
/**
176167
* If delivery is not POISON nor null, return it.
177168
* <p/>
@@ -207,6 +198,7 @@ private Delivery handle(Delivery delivery) {
207198
* @return the next message
208199
* @throws InterruptedException if an interrupt is received while waiting
209200
* @throws ShutdownSignalException if the connection is shut down while waiting
201+
* @throws ConsumerCancelledException if this consumer is cancelled while waiting
210202
*/
211203
public Delivery nextDelivery()
212204
throws InterruptedException, ShutdownSignalException, ConsumerCancelledException
@@ -220,6 +212,7 @@ public Delivery nextDelivery()
220212
* @return the next message or null if timed out
221213
* @throws InterruptedException if an interrupt is received while waiting
222214
* @throws ShutdownSignalException if the connection is shut down while waiting
215+
* @throws ConsumerCancelledException if this consumer is cancelled while waiting
223216
*/
224217
public Delivery nextDelivery(long timeout)
225218
throws InterruptedException, ShutdownSignalException, ConsumerCancelledException

0 commit comments

Comments
 (0)