Hide RecyclableArrayList from sub-classes

This commit is contained in:
Norman Maurer 2013-07-13 16:57:44 +02:00
parent 2af7db361b
commit 910c5fd594
2 changed files with 12 additions and 2 deletions

View File

@ -215,7 +215,15 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter
}
}
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, RecyclableArrayList out) {
/**
* Called once data should be decoded from the given {@link ByteBuf}. This method will call
* {@link #decode(ChannelHandlerContext, ByteBuf, List)} as long as decoding should take place.
*
* @param ctx the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belongs to
* @param in the {@link ByteBuf} from which to read data
* @param out the {@link List} to which decoded messages should be added
*/
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
try {
while (in.isReadable()) {
int outSize = out.size();

View File

@ -23,6 +23,8 @@ import io.netty.util.Signal;
import io.netty.util.internal.RecyclableArrayList;
import io.netty.util.internal.StringUtil;
import java.util.List;
/**
* A specialized variation of {@link ByteToMessageDecoder} which enables implementation
* of a non-blocking decoder in the blocking I/O paradigm.
@ -346,7 +348,7 @@ public abstract class ReplayingDecoder<S> extends ByteToMessageDecoder {
}
@Override
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, RecyclableArrayList out) {
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
replayable.setCumulation(in);
try {
while (in.isReadable()) {