package com.legalPersonMonitor.monitor;

import com.legalPersonMonitor.config.ParameterConfig;
import com.legalPersonMonitor.connections.SocketSender;
import com.legalPersonMonitor.utils.FormatBytesUtil;
import com.legalPersonMonitor.verification.VerificationI;
import com.legalPersonMonitor.verification.impl.OldVerificationImpl;

import java.util.Arrays;

import static com.legalPersonMonitor.config.ParameterConfig.VERIFICANTION_BYTE;

/**
 * Created by gaoxiang on 2018/1/22.
 * 签名服务器状态监控
 */
public class SignatureServerStatusMonitoring {
    private static String msgDescription = "";
    VerificationI oldVerificationImpl= new OldVerificationImpl();
    public  String signatureServerStatusMonitoringServer() {
        try {
            boolean aa = oldVerificationImpl.signCheck(VERIFICANTION_BYTE);
            if (aa) {
                msgDescription = "签名服务器正常运行";
            } else {
                msgDescription = "签名服务器出错";
            }
        }catch (Exception e){
            msgDescription="连接超时";
        }
        return msgDescription;
    }

}