Hide RecyclableArrayList from sub-classes
This commit is contained in:
parent
2af7db361b
commit
910c5fd594
@ -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 {
|
try {
|
||||||
while (in.isReadable()) {
|
while (in.isReadable()) {
|
||||||
int outSize = out.size();
|
int outSize = out.size();
|
||||||
|
@ -23,6 +23,8 @@ import io.netty.util.Signal;
|
|||||||
import io.netty.util.internal.RecyclableArrayList;
|
import io.netty.util.internal.RecyclableArrayList;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specialized variation of {@link ByteToMessageDecoder} which enables implementation
|
* A specialized variation of {@link ByteToMessageDecoder} which enables implementation
|
||||||
* of a non-blocking decoder in the blocking I/O paradigm.
|
* of a non-blocking decoder in the blocking I/O paradigm.
|
||||||
@ -346,7 +348,7 @@ public abstract class ReplayingDecoder<S> extends ByteToMessageDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, RecyclableArrayList out) {
|
protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
|
||||||
replayable.setCumulation(in);
|
replayable.setCumulation(in);
|
||||||
try {
|
try {
|
||||||
while (in.isReadable()) {
|
while (in.isReadable()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user