Skip to content

Commit 0cc9726

Browse files
author
Alexandru Scvortov
committed
rename pubAck -> confirm
1 parent 2a8d122 commit 0cc9726

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<property name="AMQP_SPEC_JSON_PATH" value="${codegen.dir}/amqp-rabbitmq-${spec.version}.json"/>
3030

31-
<property name="RABBIT_SPEC_EXTENSIONS" value="${codegen.dir}/puback-extension.json"/>
31+
<property name="RABBIT_SPEC_EXTENSIONS" value="${codegen.dir}/confirm-extension.json"/>
3232

3333
<target name="amqp-generate-check" description="check if codegen needs to be run">
3434
<uptodate property="amqp.generate.notRequired">

src/com/rabbitmq/client/Channel.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import com.rabbitmq.client.AMQP.Queue;
3939
import com.rabbitmq.client.AMQP.Tx;
4040
import com.rabbitmq.client.AMQP.Basic;
41-
import com.rabbitmq.client.AMQP.PubAck;
41+
import com.rabbitmq.client.AMQP.Confirm;
4242
import com.rabbitmq.client.AMQP.Channel.FlowOk;
4343

4444
/**
@@ -602,16 +602,19 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
602602
* Enables publisher acknowledgements on this channel.
603603
* @param many determines whether the broker can acknowledge
604604
* multiple messages at the same time
605-
* @see com.rabbitmq.client.AMQP.PubAck.Select
605+
* @see com.rabbitmq.client.AMQP.Confirm.Select
606606
* @throws java.io.IOException if an error is encountered
607607
*/
608-
void pubAckSelect(boolean many) throws IOException;
608+
Confirm.SelectOk confirmSelect(boolean multiple) throws IOException;
609609

610610
/**
611-
* Disables publisher acknowledgements on this channel.
612-
* @see com.rabbitmq.client.AMQP.PubAck.Deselect
613-
* @see com.rabbitmq.client.AMQP.PubAck.DeselectOk
611+
* Enables publisher acknowledgements on this channel.
612+
* @param many determines whether the broker can acknowledge
613+
* multiple messages at the same time
614+
* @param nowait whether to await completion of the request
615+
* @see com.rabbitmq.client.AMQP.Confirm.Select
614616
* @throws java.io.IOException if an error is encountered
615617
*/
616-
PubAck.DeselectOk pubAckDeselect() throws IOException;
618+
Confirm.SelectOk confirmSelect(boolean multiple, boolean nowait)
619+
throws IOException;
617620
}

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
import com.rabbitmq.client.UnexpectedMethodError;
4747
import com.rabbitmq.client.impl.AMQImpl.Basic;
4848
import com.rabbitmq.client.impl.AMQImpl.Channel;
49+
import com.rabbitmq.client.impl.AMQImpl.Confirm;
4950
import com.rabbitmq.client.impl.AMQImpl.Exchange;
5051
import com.rabbitmq.client.impl.AMQImpl.Queue;
5152
import com.rabbitmq.client.impl.AMQImpl.Tx;
52-
import com.rabbitmq.client.impl.AMQImpl.PubAck;
5353
import com.rabbitmq.utility.Utility;
5454

5555
import java.io.IOException;
@@ -813,17 +813,18 @@ public Tx.RollbackOk txRollback()
813813
}
814814

815815
/** Public API - {@inheritDoc} */
816-
public void pubAckSelect(boolean many)
816+
public Confirm.SelectOk confirmSelect(boolean multiple)
817817
throws IOException
818818
{
819-
transmit(new PubAck.Select(many));
819+
return confirmSelect(multiple, false);
820820
}
821821

822822
/** Public API - {@inheritDoc} */
823-
public PubAck.DeselectOk pubAckDeselect()
823+
public Confirm.SelectOk confirmSelect(boolean multiple, boolean nowait)
824824
throws IOException
825825
{
826-
return (PubAck.DeselectOk) exnWrappingRpc(new PubAck.Deselect()).getMethod();
826+
return (Confirm.SelectOk)
827+
exnWrappingRpc(new Confirm.Select(multiple, nowait)).getMethod();
827828
}
828829

829830
/** Public API - {@inheritDoc} */

test/src/com/rabbitmq/client/test/AMQConnectionTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ public void handleFlowListenerException(Channel ch, Throwable ex) {
201201
fail("handleFlowListenerException: " + ex);
202202
}
203203

204+
public void handleAckListenerException(Channel ch, Throwable ex) {
205+
fail("handleAckListenerException: " + ex);
206+
}
207+
204208
public void handleConsumerException(Channel ch,
205209
Throwable ex,
206210
Consumer c,

0 commit comments

Comments
 (0)