1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package io.netty.handler.codec.http2;
16
17 import io.netty.buffer.ByteBuf;
18 import io.netty.channel.ChannelHandlerContext;
19 import io.netty.util.internal.UnstableApi;
20
21
22
23
24
25 @UnstableApi
26 public class Http2EventAdapter implements Http2Connection.Listener, Http2FrameListener {
27 @Override
28 public int onDataRead(ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endOfStream)
29 throws Http2Exception {
30 return data.readableBytes() + padding;
31 }
32
33 @Override
34 public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding,
35 boolean endStream) throws Http2Exception {
36 }
37
38 @Override
39 public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency,
40 short weight, boolean exclusive, int padding, boolean endStream) throws Http2Exception {
41 }
42
43 @Override
44 public void onPriorityRead(ChannelHandlerContext ctx, int streamId, int streamDependency, short weight,
45 boolean exclusive) throws Http2Exception {
46 }
47
48 @Override
49 public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception {
50 }
51
52 @Override
53 public void onSettingsAckRead(ChannelHandlerContext ctx) throws Http2Exception {
54 }
55
56 @Override
57 public void onSettingsRead(ChannelHandlerContext ctx, Http2Settings settings) throws Http2Exception {
58 }
59
60 @Override
61 public void onPingRead(ChannelHandlerContext ctx, long data) throws Http2Exception {
62 }
63
64 @Override
65 public void onPingAckRead(ChannelHandlerContext ctx, long data) throws Http2Exception {
66 }
67
68 @Override
69 public void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId,
70 Http2Headers headers, int padding) throws Http2Exception {
71 }
72
73 @Override
74 public void onGoAwayRead(ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData)
75 throws Http2Exception {
76 }
77
78 @Override
79 public void onWindowUpdateRead(ChannelHandlerContext ctx, int streamId, int windowSizeIncrement)
80 throws Http2Exception {
81 }
82
83 @Override
84 public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags,
85 ByteBuf payload) throws Http2Exception {
86 }
87
88 @Override
89 public void onStreamAdded(Http2Stream stream) {
90 }
91
92 @Override
93 public void onStreamActive(Http2Stream stream) {
94 }
95
96 @Override
97 public void onStreamHalfClosed(Http2Stream stream) {
98 }
99
100 @Override
101 public void onStreamClosed(Http2Stream stream) {
102 }
103
104 @Override
105 public void onStreamRemoved(Http2Stream stream) {
106 }
107
108 @Override
109 public void onGoAwaySent(int lastStreamId, long errorCode, ByteBuf debugData) {
110 }
111
112 @Override
113 public void onGoAwayReceived(int lastStreamId, long errorCode, ByteBuf debugData) {
114 }
115 }