@Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { super.decode(ctx, in, out); }
public MessageDecoder(BufferAllocator allocator) { super(); setCumulator(COMPOSITE_CUMULATOR); this.allocator = allocator; }
checkTag(is, RpcEncoder.HEADER_TAG); final RpcHeader header = RpcHeader.parseDelimitedFrom(is); checkTag(is, RpcEncoder.PROTOBUF_BODY_TAG); final int pBodyLength = readRawVarint32(is); checkTag(is, RpcEncoder.RAW_BODY_TAG); final int dBodyLength = readRawVarint32(is); sendOutOfMemory(e, ctx, header.getCoordinationId()); return null;
private void checkTag(ByteBufInputStream is, int expectedTag) throws IOException { int actualTag = readRawVarint32(is); if (actualTag != expectedTag) { throw new CorruptedFrameException(String.format("Expected to read a tag of %d but actually received a value of %d. Happened after reading %d message.", expectedTag, actualTag, messageCounter.get())); } }
final InboundRpcMessage message = decodeMessage(ctx, frame, length); if (message != null) { out.add(message);
@Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { super.decode(ctx, in, out); }