1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.stomp;
17
18 import io.netty.buffer.ByteBuf;
19 import io.netty.buffer.Unpooled;
20 import io.netty.handler.codec.DecoderResult;
21
22
23
24
25
26
27
28
29 public interface LastStompContentSubframe extends StompContentSubframe {
30
31 LastStompContentSubframe EMPTY_LAST_CONTENT = new LastStompContentSubframe() {
32 @Override
33 public ByteBuf content() {
34 return Unpooled.EMPTY_BUFFER;
35 }
36
37 @Override
38 public LastStompContentSubframe copy() {
39 return EMPTY_LAST_CONTENT;
40 }
41
42 @Override
43 public LastStompContentSubframe duplicate() {
44 return this;
45 }
46
47 @Override
48 public LastStompContentSubframe retainedDuplicate() {
49 return this;
50 }
51
52 @Override
53 public LastStompContentSubframe replace(ByteBuf content) {
54 return new DefaultLastStompContentSubframe(content);
55 }
56
57 @Override
58 public LastStompContentSubframe retain() {
59 return this;
60 }
61
62 @Override
63 public LastStompContentSubframe retain(int increment) {
64 return this;
65 }
66
67 @Override
68 public LastStompContentSubframe touch() {
69 return this;
70 }
71
72 @Override
73 public LastStompContentSubframe touch(Object hint) {
74 return this;
75 }
76
77 @Override
78 public int refCnt() {
79 return 1;
80 }
81
82 @Override
83 public boolean release() {
84 return false;
85 }
86
87 @Override
88 public boolean release(int decrement) {
89 return false;
90 }
91
92 @Override
93 public DecoderResult decoderResult() {
94 return DecoderResult.SUCCESS;
95 }
96
97 @Override
98 public void setDecoderResult(DecoderResult result) {
99 throw new UnsupportedOperationException("read only");
100 }
101 };
102
103 @Override
104 LastStompContentSubframe copy();
105
106 @Override
107 LastStompContentSubframe duplicate();
108
109 @Override
110 LastStompContentSubframe retainedDuplicate();
111
112 @Override
113 LastStompContentSubframe replace(ByteBuf content);
114
115 @Override
116 LastStompContentSubframe retain();
117
118 @Override
119 LastStompContentSubframe retain(int increment);
120
121 @Override
122 LastStompContentSubframe touch();
123
124 @Override
125 LastStompContentSubframe touch(Object hint);
126 }