类 LsTesterService
java.lang.Object
com.sie.mbm.mom.framework.license.server.LsTesterService
证书校验服务
主要负责以下的功能:
1. 开机启动证书是否有效;
2. 启动定时器检测证书是否有效
3. 证书无效就关闭应用
-
字段概要
字段 -
构造器概要
构造器构造器说明LsTesterService(org.springframework.context.ApplicationContext context, LsProperties properties, LsHandler licenseHandler) -
方法概要
修饰符和类型方法说明private void检查证书的满足条件, 若不满足,则退出应用.private void检测使用或正式证书是否有效private void退出应用void每天零点检测证书是否有效 cron 表达式的格式是:秒 分 时 日 月 周 年(可选)void每24小时检测证书是否有效void服务初始化时检测证书是否有效
-
字段详细资料
-
licenseHandler
-
license
-
machineUniqueId
-
appName
-
context
private org.springframework.context.ApplicationContext context -
properties
-
LICENSE_EXPIRE_FORMAT
-
-
构造器详细资料
-
LsTesterService
public LsTesterService(org.springframework.context.ApplicationContext context, LsProperties properties, LsHandler licenseHandler)
-
-
方法详细资料
-
onApplicationStart
public void onApplicationStart()服务初始化时检测证书是否有效 -
licenseTesting
@Scheduled(cron="0 0 0 * * ?") public void licenseTesting()每天零点检测证书是否有效 cron 表达式的格式是:秒 分 时 日 月 周 年(可选) -
licenseTestingCircle
@Scheduled(initialDelay=10000L, fixedRate=7200000L) public void licenseTestingCircle()每24小时检测证书是否有效 -
checkTrialOrFormalLicense
private void checkTrialOrFormalLicense()检测使用或正式证书是否有效 -
checkAndExit
private void checkAndExit()检查证书的满足条件, 若不满足,则退出应用. -
doAppExit
private void doAppExit()退出应用
-