@Test(expected = ClosedChannelException.class) public void streamClosedErrorTranslatedToClosedChannelExceptionOnWrites() throws Exception { writer = new Writer() { @Override void write(Object msg, ChannelPromise promise) { promise.tryFailure(new StreamException(inboundStream.id(), Http2Error.STREAM_CLOSED, "Stream Closed")); } }; LastInboundHandler inboundHandler = new LastInboundHandler(); childChannelInitializer.handler = inboundHandler; Channel childChannel = newOutboundStream(); assertTrue(childChannel.isActive()); ChannelFuture future = childChannel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers())); parentChannel.flush(); assertFalse(childChannel.isActive()); assertFalse(childChannel.isOpen()); inboundHandler.checkException(); future.syncUninterruptibly(); }
final Http2StreamChannel newOutboundStream() { return new DefaultHttp2StreamChannel(newStream(), true); }
Http2MultiplexCodec extends Http2FrameCodec { final Http2StreamChannel newOutboundStream() { return new DefaultHttp2StreamChannel(newStream(), true); } }
Http2MultiplexCodec extends Http2FrameCodec { final Http2StreamChannel newOutboundStream() { return new DefaultHttp2StreamChannel(newStream(), true); } Http2MultiplexCodec(Http2ConnectionEncoder encoder,
                        Http2ConnectionDecoder decoder,
                        Http2Settings initialSettings,
                        ChannelHandler inboundStreamHandler); }
Http2MultiplexCodec extends Http2FrameCodec { final Http2StreamChannel newOutboundStream() { return new DefaultHttp2StreamChannel(newStream(), true); } Http2MultiplexCodec(Http2ConnectionEncoder encoder,
                        Http2ConnectionDecoder decoder,
                        Http2Settings initialSettings,
                        ChannelHandler inboundStreamHandler); @Override final void handlerAdded0(ChannelHandlerContext ctx); @Override final void handlerRemoved0(ChannelHandlerContext ctx); @Override final void channelReadComplete(ChannelHandlerContext ctx); @Override final void channelRead(ChannelHandlerContext ctx, Object msg); }
Http2MultiplexCodec extends Http2FrameCodec { final Http2StreamChannel newOutboundStream() { return new DefaultHttp2StreamChannel(newStream(), true); } Http2MultiplexCodec(Http2ConnectionEncoder encoder,
                        Http2ConnectionDecoder decoder,
                        Http2Settings initialSettings,
                        ChannelHandler inboundStreamHandler); @Override final void handlerAdded0(ChannelHandlerContext ctx); @Override final void handlerRemoved0(ChannelHandlerContext ctx); @Override final void channelReadComplete(ChannelHandlerContext ctx); @Override final void channelRead(ChannelHandlerContext ctx, Object msg);  }