package cn.reghao.autodop.common.msg.rpc;

import lombok.Data;

import java.io.Serializable;

/**
 * @author reghao
 * @date 2021-08-25 17:19:41
 */
@Data
public class RpcPayload implements Serializable {
    private static final long serialVersionUID = 1L;

    private String clazz;
    private String method;
    private String jsonParam;

    public static RpcPayload rpcPayload(String clazz, String method) {
        RpcPayload nodeMsg = new RpcPayload();
        nodeMsg.setClazz(clazz);
        nodeMsg.setMethod(method);
        return nodeMsg;
    }

    public static RpcPayload rpcPayload(String clazz, String method, String jsonParam) {
        RpcPayload nodeMsg = new RpcPayload();
        nodeMsg.setClazz(clazz);
        nodeMsg.setMethod(method);
        nodeMsg.setJsonParam(jsonParam);
        return nodeMsg;
    }
}
