package com.youchain.modules.license;



import com.youchain.modules.license.domain.LicenseCheck;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 92525
 */
@Slf4j
public abstract class AGxServerInfos {


    /**
     * <p>组装需要额外校验的License参数</p>
     */
    public LicenseCheck getServerInfos(){

        LicenseCheck result = new LicenseCheck();
        try {
            result.setCpuSerial(this.getCpuSerial());
            result.setMainBoardSerial(this.getMainBoardSerial());
        }catch (Exception e){
            log.error("获取服务器硬件信息失败",e);
        }

        return result;
    }



    /**
     * <p>获取CPU序列号</p>
     */
    protected abstract String getCpuSerial() throws Exception;

    /**
     * <p>获取主板序列号</p>
     */
    protected abstract String getMainBoardSerial() throws Exception;

    /**
     * <p>获取当前服务器所有符合条件的InetAddress</p>
     */
    

}
