@Override
    public <T extends RequestCommand> boolean deserializeContent(T request) throws DeserializationException {
        final RpcRequestCommand cmd = (RpcRequestCommand) request;
        final String className = cmd.getRequestClass();

        cmd.setRequestObject(ProtobufMsgFactory.newMessageByJavaClassName(className, request.getContent()));
        return true;
    }
RPC custom serializer based on protobuf
@author boyan (boyan@alibaba-inc.com)

2018-Mar-26 4:43:21 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/ProtobufSerializer.java