@Test(timeout = 5000) public void newOutboundStream() { final Http2FrameStream stream = frameCodec.newStream(); assertNotNull(stream); assertFalse(isStreamIdValid(stream.id())); final Promise<Void> listenerExecuted = new DefaultPromise<Void>(GlobalEventExecutor.INSTANCE); channel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers(), false).stream(stream)) .addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { assertTrue(future.isSuccess()); assertTrue(isStreamIdValid(stream.id())); listenerExecuted.setSuccess(null); } } ); ByteBuf data = Unpooled.buffer().writeZero(100); ChannelFuture f = channel.writeAndFlush(new DefaultHttp2DataFrame(data).stream(stream)); assertTrue(f.isSuccess()); listenerExecuted.syncUninterruptibly(); assertTrue(listenerExecuted.isSuccess()); }
DefaultHttp2FrameStream newStream() { return new DefaultHttp2FrameStream(); }
Http2FrameCodec extends Http2ConnectionHandler { DefaultHttp2FrameStream newStream() { return new DefaultHttp2FrameStream(); } }
Http2FrameCodec extends Http2ConnectionHandler { DefaultHttp2FrameStream newStream() { return new DefaultHttp2FrameStream(); } Http2FrameCodec(Http2ConnectionEncoder encoder, Http2ConnectionDecoder decoder, Http2Settings initialSettings); }
Http2FrameCodec extends Http2ConnectionHandler { DefaultHttp2FrameStream newStream() { return new DefaultHttp2FrameStream(); } Http2FrameCodec(Http2ConnectionEncoder encoder, Http2ConnectionDecoder decoder, Http2Settings initialSettings); @Override final void handlerAdded(ChannelHandlerContext ctx); @Override final void userEventTriggered(ChannelHandlerContext ctx, Object evt); @Override void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise); }
Http2FrameCodec extends Http2ConnectionHandler { DefaultHttp2FrameStream newStream() { return new DefaultHttp2FrameStream(); } Http2FrameCodec(Http2ConnectionEncoder encoder, Http2ConnectionDecoder decoder, Http2Settings initialSettings); @Override final void handlerAdded(ChannelHandlerContext ctx); @Override final void userEventTriggered(ChannelHandlerContext ctx, Object evt); @Override void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise);  }