1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package io.netty5.handler.codec.http2;
16
17 import io.netty5.buffer.api.Buffer;
18 import io.netty5.channel.ChannelHandlerContext;
19 import io.netty5.util.internal.UnstableApi;
20
21
22
23
24 @UnstableApi
25 public class Http2FrameAdapter implements Http2FrameListener {
26
27 @Override
28 public int onDataRead(ChannelHandlerContext ctx, int streamId, Buffer data, int padding,
29 boolean endOfStream) throws Http2Exception {
30 return data.readableBytes() + padding;
31 }
32
33 @Override
34 public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers,
35 int padding, boolean endStream) throws Http2Exception {
36 }
37
38 @Override
39 public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers,
40 int streamDependency, short weight, boolean exclusive, int padding, boolean endStream)
41 throws Http2Exception {
42 }
43
44 @Override
45 public void onPriorityRead(ChannelHandlerContext ctx, int streamId, int streamDependency,
46 short weight, boolean exclusive) throws Http2Exception {
47 }
48
49 @Override
50 public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode)
51 throws Http2Exception {
52 }
53
54 @Override
55 public void onSettingsAckRead(ChannelHandlerContext ctx) throws Http2Exception {
56 }
57
58 @Override
59 public void onSettingsRead(ChannelHandlerContext ctx, Http2Settings settings)
60 throws Http2Exception {
61 }
62
63 @Override
64 public void onPingRead(ChannelHandlerContext ctx, long data) throws Http2Exception {
65 }
66
67 @Override
68 public void onPingAckRead(ChannelHandlerContext ctx, long data) throws Http2Exception {
69 }
70
71 @Override
72 public void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId,
73 Http2Headers headers, int padding) throws Http2Exception {
74 }
75
76 @Override
77 public void onGoAwayRead(ChannelHandlerContext ctx, int lastStreamId, long errorCode,
78 Buffer debugData) throws Http2Exception {
79 }
80
81 @Override
82 public void onWindowUpdateRead(ChannelHandlerContext ctx, int streamId, int windowSizeIncrement)
83 throws Http2Exception {
84 }
85
86 @Override
87 public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags,
88 Buffer payload) {
89 }
90 }