Skip to content

Commit 874fc0a

Browse files
committed
remove Channel.flow
and rename completely misleading getFlow method and give it a sensible return type.
1 parent 4a1c9f2 commit 874fc0a

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.rabbitmq.client.AMQP.Tx;
2727
import com.rabbitmq.client.AMQP.Basic;
2828
import com.rabbitmq.client.AMQP.Confirm;
29-
import com.rabbitmq.client.AMQP.Channel.FlowOk;
3029

3130
/**
3231
* Public API: Interface to an AMQ channel. See the <a href="http://www.amqp.org/">spec</a> for details.
@@ -90,17 +89,11 @@ public interface Channel extends ShutdownNotifier {
9089
void close(int closeCode, String closeMessage) throws IOException;
9190

9291
/**
93-
* Set flow on the channel
94-
*
95-
* @param active if true, the server is asked to start sending. If false, the server is asked to stop sending.
96-
* @throws IOException
97-
*/
98-
FlowOk flow(boolean active) throws IOException;
99-
100-
/**
101-
* Return the current Channel.Flow settings.
92+
* Indicates whether the server has asked this client to stop
93+
* sending content-bearing commands (such as basic.publish) by
94+
* issueing a channel.flow{active=false}.
10295
*/
103-
FlowOk getFlow();
96+
boolean flowBlocked();
10497

10598
/**
10699
* Abort this channel with the {@link com.rabbitmq.client.AMQP#REPLY_SUCCESS} close code

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,13 +1057,8 @@ public Confirm.SelectOk confirmSelect()
10571057
}
10581058

10591059
/** Public API - {@inheritDoc} */
1060-
public Channel.FlowOk flow(final boolean a) throws IOException {
1061-
return (Channel.FlowOk) exnWrappingRpc(new Channel.Flow(a)).getMethod();
1062-
}
1063-
1064-
/** Public API - {@inheritDoc} */
1065-
public Channel.FlowOk getFlow() {
1066-
return new Channel.FlowOk(!_blockContent);
1060+
public boolean flowBlocked() {
1061+
return _blockContent;
10671062
}
10681063

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

0 commit comments

Comments
 (0)