Skip to content

Commit 91fcf04

Browse files
author
Emile Joubert
committed
Update docs
1 parent 91f7f87 commit 91fcf04

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,34 +745,40 @@ void basicNack(long deliveryTag, boolean multiple, boolean requeue)
745745
/**
746746
* Wait until all messages published since the last call have been
747747
* either ack'd or nack'd by the broker. Note, when called on a
748-
* non-Confirm channel, waitForConfirms returns true immediately.
748+
* non-Confirm channel, waitForConfirms throws an IllegalStateException.
749749
* @return whether all the messages were ack'd (and none were nack'd)
750+
* @throws java.lang.IllegalStateException
750751
*/
751752
boolean waitForConfirms() throws InterruptedException;
752753

753754
/**
754755
* Wait until all messages published since the last call have been
755756
* either ack'd or nack'd by the broker; or until timeout elapses.
756757
* If the timeout expires a TimeoutException is thrown. When
757-
* called on a non-Confirm channel, waitForConfirms returns true
758-
* immediately.
758+
* called on a non-Confirm channel, waitForConfirms throws an
759+
* IllegalStateException.
759760
* @return whether all the messages were ack'd (and none were nack'd)
761+
* @throws java.lang.IllegalStateException
760762
*/
761763
boolean waitForConfirms(long timeout) throws InterruptedException, TimeoutException;
762764

763765
/** Wait until all messages published since the last call have
764766
* been either ack'd or nack'd by the broker. If any of the
765767
* messages were nack'd, waitForConfirmsOrDie will throw an
766768
* IOException. When called on a non-Confirm channel, it will
767-
* return immediately. */
768-
void waitForConfirmsOrDie() throws IOException, InterruptedException;
769+
* throw an IllegalStateException.
770+
* @throws java.lang.IllegalStateException
771+
*/
772+
void waitForConfirmsOrDie() throws IOException, InterruptedException;
769773

770774
/** Wait until all messages published since the last call have
771775
* been either ack'd or nack'd by the broker; or until timeout elapses.
772776
* If the timeout expires a TimeoutException is thrown. If any of the
773777
* messages were nack'd, waitForConfirmsOrDie will throw an
774778
* IOException. When called on a non-Confirm channel, it will
775-
* return immediately. */
779+
* throw an IllegalStateException.
780+
* @throws java.lang.IllegalStateException
781+
*/
776782
void waitForConfirmsOrDie(long timeout) throws IOException, InterruptedException, TimeoutException;
777783

778784
/**

0 commit comments

Comments
 (0)