@Test(timeout = 60000) public void testExactDemandAndSupply() throws Exception { assertThat("Unexpected handler state.", handlerRule.handler.getCurrentState(), is(State.Buffering)); final String msg1 = "hello1"; final String msg2 = "hello2"; handlerRule.feedMessagesForRead(msg1, msg2); handlerRule.setMaxMessagesPerRead(2); handlerRule.requestMessages(2); assertThat("Unexpected read requested count.", handlerRule.getReadRequestedCount(), is(1)); handlerRule.assertMessagesReceived(msg1, msg2); assertThat("Unexpected handler state.", handlerRule.handler.getCurrentState(), is(State.Buffering)); }
State getCurrentState() { return currentState; }
BackpressureManagingHandler extends ChannelDuplexHandler { State getCurrentState() { return currentState; } }
BackpressureManagingHandler extends ChannelDuplexHandler { State getCurrentState() { return currentState; } protected  BackpressureManagingHandler(String thisHandlerName); }
BackpressureManagingHandler extends ChannelDuplexHandler { State getCurrentState() { return currentState; } protected  BackpressureManagingHandler(String thisHandlerName); @SuppressWarnings("fallthrough") @Override final void channelRead(ChannelHandlerContext ctx, Object msg); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void handlerRemoved(ChannelHandlerContext ctx); @Override final void channelReadComplete(ChannelHandlerContext ctx); @Override final void read(ChannelHandlerContext ctx); @Override void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise); @Override void userEventTriggered(ChannelHandlerContext ctx, Object evt); }
BackpressureManagingHandler extends ChannelDuplexHandler { State getCurrentState() { return currentState; } protected  BackpressureManagingHandler(String thisHandlerName); @SuppressWarnings("fallthrough") @Override final void channelRead(ChannelHandlerContext ctx, Object msg); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void handlerRemoved(ChannelHandlerContext ctx); @Override final void channelReadComplete(ChannelHandlerContext ctx); @Override final void read(ChannelHandlerContext ctx); @Override void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise); @Override void userEventTriggered(ChannelHandlerContext ctx, Object evt);  }