1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty5.handler.codec.http2;
17
18 import io.netty5.util.internal.StringUtil;
19 import io.netty5.util.internal.UnstableApi;
20
21
22
23
24 @UnstableApi
25 public class DefaultHttp2WindowUpdateFrame extends AbstractHttp2StreamFrame implements Http2WindowUpdateFrame {
26
27 private final int windowUpdateIncrement;
28
29 public DefaultHttp2WindowUpdateFrame(int windowUpdateIncrement) {
30 this.windowUpdateIncrement = windowUpdateIncrement;
31 }
32
33 @Override
34 public DefaultHttp2WindowUpdateFrame stream(Http2FrameStream stream) {
35 super.stream(stream);
36 return this;
37 }
38
39 @Override
40 public String name() {
41 return "WINDOW_UPDATE";
42 }
43
44 @Override
45 public int windowSizeIncrement() {
46 return windowUpdateIncrement;
47 }
48
49 @Override
50 public String toString() {
51 return StringUtil.simpleClassName(this) +
52 "(stream=" + stream() + ", windowUpdateIncrement=" + windowUpdateIncrement + ')';
53 }
54 }