类 LsTesterService

java.lang.Object
com.sie.mbm.mom.framework.license.server.LsTesterService

public class LsTesterService extends Object
证书校验服务 主要负责以下的功能: 1. 开机启动证书是否有效; 2. 启动定时器检测证书是否有效 3. 证书无效就关闭应用
  • 字段详细资料

    • licenseHandler

      private LsHandler licenseHandler
    • license

      private LsDTO license
    • machineUniqueId

      private String machineUniqueId
    • appName

      private String appName
    • context

      private org.springframework.context.ApplicationContext context
    • properties

      private LsProperties properties
    • LICENSE_EXPIRE_FORMAT

      private static String 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()
      退出应用