@Test public void testReleaseInbound() { ByteBuf in = Unpooled.buffer(); ByteBuf out = Unpooled.buffer(); try { EmbeddedChannel channel = new EmbeddedChannel(); assertTrue(channel.writeInbound(in)); assertEquals(1, in.refCnt()); assertTrue(channel.writeOutbound(out)); assertEquals(1, out.refCnt()); assertTrue(channel.releaseInbound()); assertEquals(0, in.refCnt()); assertEquals(1, out.refCnt()); assertTrue(channel.finish()); assertNull(channel.readInbound()); ByteBuf buffer = channel.readOutbound(); assertSame(out, buffer); buffer.release(); assertNull(channel.readOutbound()); } finally { release(in, out); } }
public boolean releaseInbound() { return releaseAll(inboundMessages); }
EmbeddedChannel extends AbstractChannel { public boolean releaseInbound() { return releaseAll(inboundMessages); } }
EmbeddedChannel extends AbstractChannel { public boolean releaseInbound() { return releaseAll(inboundMessages); } EmbeddedChannel();  EmbeddedChannel(ChannelId channelId);  EmbeddedChannel(ChannelHandler... handlers);  EmbeddedChannel(boolean hasDisconnect, ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelConfig config,
                           final ChannelHandler... handlers); }
EmbeddedChannel extends AbstractChannel { public boolean releaseInbound() { return releaseAll(inboundMessages); } EmbeddedChannel();  EmbeddedChannel(ChannelId channelId);  EmbeddedChannel(ChannelHandler... handlers);  EmbeddedChannel(boolean hasDisconnect, ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelConfig config,
                           final ChannelHandler... handlers); @Override ChannelMetadata metadata(); @Override ChannelConfig config(); @Override boolean isOpen(); @Override boolean isActive(); Queue<Object> inboundMessages(); @Deprecated Queue<Object> lastInboundBuffer(); Queue<Object> outboundMessages(); @Deprecated Queue<Object> lastOutboundBuffer(); @SuppressWarnings("unchecked") T readInbound(); @SuppressWarnings("unchecked") T readOutbound(); boolean writeInbound(Object... msgs); boolean writeOutbound(Object... msgs); boolean finish(); boolean finishAndReleaseAll(); boolean releaseInbound(); boolean releaseOutbound(); @Override final ChannelFuture close(); @Override final ChannelFuture disconnect(); @Override final ChannelFuture close(ChannelPromise promise); @Override final ChannelFuture disconnect(ChannelPromise promise); void runPendingTasks(); long runScheduledPendingTasks(); void checkException(); }
EmbeddedChannel extends AbstractChannel { public boolean releaseInbound() { return releaseAll(inboundMessages); } EmbeddedChannel();  EmbeddedChannel(ChannelId channelId);  EmbeddedChannel(ChannelHandler... handlers);  EmbeddedChannel(boolean hasDisconnect, ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelHandler... handlers);  EmbeddedChannel(ChannelId channelId, boolean hasDisconnect, final ChannelConfig config,
                           final ChannelHandler... handlers); @Override ChannelMetadata metadata(); @Override ChannelConfig config(); @Override boolean isOpen(); @Override boolean isActive(); Queue<Object> inboundMessages(); @Deprecated Queue<Object> lastInboundBuffer(); Queue<Object> outboundMessages(); @Deprecated Queue<Object> lastOutboundBuffer(); @SuppressWarnings("unchecked") T readInbound(); @SuppressWarnings("unchecked") T readOutbound(); boolean writeInbound(Object... msgs); boolean writeOutbound(Object... msgs); boolean finish(); boolean finishAndReleaseAll(); boolean releaseInbound(); boolean releaseOutbound(); @Override final ChannelFuture close(); @Override final ChannelFuture disconnect(); @Override final ChannelFuture close(ChannelPromise promise); @Override final ChannelFuture disconnect(ChannelPromise promise); void runPendingTasks(); long runScheduledPendingTasks(); void checkException();  }