Delegate to the actual encoder/decoder if possible

This commit is contained in:
Trustin Lee 2013-01-09 15:09:20 +09:00
parent 102563ec8f
commit 5c2be33cae

View File

@ -109,13 +109,7 @@ public abstract class MessageToMessageCodec<INBOUND_IN, INBOUND_OUT, OUTBOUND_IN
@Override
public void freeInboundBuffer(ChannelHandlerContext ctx) throws Exception {
ctx.inboundMessageBuffer().free();
}
@Override
public void inboundBufferUpdated(
ChannelHandlerContext ctx) throws Exception {
decoder.inboundBufferUpdated(ctx);
decoder.freeInboundBuffer(ctx);
}
@Override
@ -125,7 +119,13 @@ public abstract class MessageToMessageCodec<INBOUND_IN, INBOUND_OUT, OUTBOUND_IN
@Override
public void freeOutboundBuffer(ChannelHandlerContext ctx) throws Exception {
ctx.outboundMessageBuffer().free();
encoder.freeOutboundBuffer(ctx);
}
@Override
public void inboundBufferUpdated(
ChannelHandlerContext ctx) throws Exception {
decoder.inboundBufferUpdated(ctx);
}
@Override