@Test public void readUnknownFrame() throws Http2Exception { ByteBuf input = Unpooled.buffer(); ByteBuf payload = Unpooled.buffer(); try { payload.writeByte(1); writeFrameHeader(input, payload.readableBytes(), (byte) 0xff, new Http2Flags(), 0); input.writeBytes(payload); frameReader.readFrame(ctx, input, listener); verify(listener).onUnknownFrame( ctx, (byte) 0xff, 0, new Http2Flags(), payload.slice(0, 1)); } finally { payload.release(); input.release(); } }
private void readUnknownFrame(ChannelHandlerContext ctx, ByteBuf payload, Http2FrameListener listener) throws Http2Exception { payload = payload.readSlice(payload.readableBytes()); listener.onUnknownFrame(ctx, frameType, streamId, flags, payload); }
DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration { private void readUnknownFrame(ChannelHandlerContext ctx, ByteBuf payload, Http2FrameListener listener) throws Http2Exception { payload = payload.readSlice(payload.readableBytes()); listener.onUnknownFrame(ctx, frameType, streamId, flags, payload); } }
DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration { private void readUnknownFrame(ChannelHandlerContext ctx, ByteBuf payload, Http2FrameListener listener) throws Http2Exception { payload = payload.readSlice(payload.readableBytes()); listener.onUnknownFrame(ctx, frameType, streamId, flags, payload); } DefaultHttp2FrameReader();  DefaultHttp2FrameReader(boolean validateHeaders);  DefaultHttp2FrameReader(Http2HeadersDecoder headersDecoder); }
DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration { private void readUnknownFrame(ChannelHandlerContext ctx, ByteBuf payload, Http2FrameListener listener) throws Http2Exception { payload = payload.readSlice(payload.readableBytes()); listener.onUnknownFrame(ctx, frameType, streamId, flags, payload); } DefaultHttp2FrameReader();  DefaultHttp2FrameReader(boolean validateHeaders);  DefaultHttp2FrameReader(Http2HeadersDecoder headersDecoder); @Override Http2HeadersDecoder.Configuration headersConfiguration(); @Override Configuration configuration(); @Override Http2FrameSizePolicy frameSizePolicy(); @Override void maxFrameSize(int max); @Override int maxFrameSize(); @Override void close(); @Override void readFrame(ChannelHandlerContext ctx, ByteBuf input, Http2FrameListener listener); }
DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration { private void readUnknownFrame(ChannelHandlerContext ctx, ByteBuf payload, Http2FrameListener listener) throws Http2Exception { payload = payload.readSlice(payload.readableBytes()); listener.onUnknownFrame(ctx, frameType, streamId, flags, payload); } DefaultHttp2FrameReader();  DefaultHttp2FrameReader(boolean validateHeaders);  DefaultHttp2FrameReader(Http2HeadersDecoder headersDecoder); @Override Http2HeadersDecoder.Configuration headersConfiguration(); @Override Configuration configuration(); @Override Http2FrameSizePolicy frameSizePolicy(); @Override void maxFrameSize(int max); @Override int maxFrameSize(); @Override void close(); @Override void readFrame(ChannelHandlerContext ctx, ByteBuf input, Http2FrameListener listener);  }