1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.http2;
17
18 import io.netty.handler.codec.EmptyHeaders;
19 import io.netty.util.internal.UnstableApi;
20
21 @UnstableApi
22 public final class EmptyHttp2Headers
23 extends EmptyHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers {
24 public static final EmptyHttp2Headers INSTANCE = new EmptyHttp2Headers();
25
26 private EmptyHttp2Headers() {
27 }
28
29 @Override
30 public EmptyHttp2Headers method(CharSequence method) {
31 throw new UnsupportedOperationException();
32 }
33
34 @Override
35 public EmptyHttp2Headers scheme(CharSequence status) {
36 throw new UnsupportedOperationException();
37 }
38
39 @Override
40 public EmptyHttp2Headers authority(CharSequence authority) {
41 throw new UnsupportedOperationException();
42 }
43
44 @Override
45 public EmptyHttp2Headers path(CharSequence path) {
46 throw new UnsupportedOperationException();
47 }
48
49 @Override
50 public EmptyHttp2Headers status(CharSequence status) {
51 throw new UnsupportedOperationException();
52 }
53
54 @Override
55 public CharSequence method() {
56 return get(PseudoHeaderName.METHOD.value());
57 }
58
59 @Override
60 public CharSequence scheme() {
61 return get(PseudoHeaderName.SCHEME.value());
62 }
63
64 @Override
65 public CharSequence authority() {
66 return get(PseudoHeaderName.AUTHORITY.value());
67 }
68
69 @Override
70 public CharSequence path() {
71 return get(PseudoHeaderName.PATH.value());
72 }
73
74 @Override
75 public CharSequence status() {
76 return get(PseudoHeaderName.STATUS.value());
77 }
78
79 @Override
80 public boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive) {
81 return false;
82 }
83 }