1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.memcache;
17
18 import io.netty.channel.ChannelHandler;
19 import io.netty.channel.ChannelPipeline;
20 import io.netty.handler.codec.MessageAggregator;
21 import io.netty.handler.codec.memcache.binary.BinaryMemcacheRequestDecoder;
22 import io.netty.handler.codec.memcache.binary.BinaryMemcacheResponseEncoder;
23 import io.netty.util.internal.UnstableApi;
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 @UnstableApi
46 public abstract class AbstractMemcacheObjectAggregator<H extends MemcacheMessage> extends
47 MessageAggregator<MemcacheObject, H, MemcacheContent, FullMemcacheMessage> {
48
49 protected AbstractMemcacheObjectAggregator(int maxContentLength) {
50 super(maxContentLength);
51 }
52
53 @Override
54 protected boolean isContentMessage(MemcacheObject msg) throws Exception {
55 return msg instanceof MemcacheContent;
56 }
57
58 @Override
59 protected boolean isLastContentMessage(MemcacheContent msg) throws Exception {
60 return msg instanceof LastMemcacheContent;
61 }
62
63 @Override
64 protected boolean isAggregated(MemcacheObject msg) throws Exception {
65 return msg instanceof FullMemcacheMessage;
66 }
67
68 @Override
69 protected boolean isContentLengthInvalid(H start, int maxContentLength) {
70 return false;
71 }
72
73 @Override
74 protected Object newContinueResponse(H start, int maxContentLength, ChannelPipeline pipeline) {
75 return null;
76 }
77
78 @Override
79 protected boolean closeAfterContinueResponse(Object msg) throws Exception {
80 throw new UnsupportedOperationException();
81 }
82
83 @Override
84 protected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception {
85 throw new UnsupportedOperationException();
86 }
87 }