diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObject.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObject.java index ce1b28430b..9d1ec17750 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObject.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/AbstractMemcacheObject.java @@ -29,7 +29,7 @@ public abstract class AbstractMemcacheObject implements MemcacheObject { } @Override - public DecoderResult getDecoderResult() { + public DecoderResult decoderResult() { return decoderResult; } @@ -41,5 +41,4 @@ public abstract class AbstractMemcacheObject implements MemcacheObject { decoderResult = result; } - } diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/DefaultMemcacheContent.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/DefaultMemcacheContent.java index 2923c02d7c..32f0022ff8 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/DefaultMemcacheContent.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/DefaultMemcacheContent.java @@ -92,6 +92,6 @@ public class DefaultMemcacheContent extends AbstractMemcacheObject implements Me @Override public String toString() { return StringUtil.simpleClassName(this) + - "(data: " + content() + ", getDecoderResult: " + getDecoderResult() + ')'; + "(data: " + content() + ", decoderResult: " + decoderResult() + ')'; } } diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/LastMemcacheContent.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/LastMemcacheContent.java index 0369a3c768..0b20bdd2c6 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/LastMemcacheContent.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/LastMemcacheContent.java @@ -66,7 +66,7 @@ public interface LastMemcacheContent extends MemcacheContent { } @Override - public DecoderResult getDecoderResult() { + public DecoderResult decoderResult() { return DecoderResult.SUCCESS; } diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/MemcacheObject.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/MemcacheObject.java index cf0a86d483..5cb072de2e 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/MemcacheObject.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/MemcacheObject.java @@ -15,23 +15,9 @@ */ package io.netty.handler.codec.memcache; -import io.netty.handler.codec.DecoderResult; +import io.netty.handler.codec.DecoderResultProvider; /** * Defines a common interface for all {@link MemcacheObject} implementations. */ -public interface MemcacheObject { - - /** - * Returns the result of decoding this message. - */ - DecoderResult getDecoderResult(); - - /** - * Updates the result of decoding this message. - *
- *Do not call this method unless you know what you are doing.
- */ - void setDecoderResult(DecoderResult result); - -} +public interface MemcacheObject extends DecoderResultProvider { } diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheDecoder.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheDecoder.java index b0a78c4e66..58d29383be 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheDecoder.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/AbstractBinaryMemcacheDecoder.java @@ -24,7 +24,6 @@ import io.netty.handler.codec.memcache.DefaultLastMemcacheContent; import io.netty.handler.codec.memcache.DefaultMemcacheContent; import io.netty.handler.codec.memcache.LastMemcacheContent; import io.netty.handler.codec.memcache.MemcacheContent; -import io.netty.handler.codec.memcache.MemcacheMessage; import io.netty.util.CharsetUtil; import java.util.List; @@ -84,7 +83,7 @@ public abstract class AbstractBinaryMemcacheDecoder