You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
/* |
|
* Copyright (C), 2018-2021 |
|
* Project: starter |
|
* FileName: PluginMonitor |
|
* Author: Louis |
|
* Date: 2021/3/30 15:10 |
|
*/ |
|
package com.fr.plugin.tabledataservice.provider; |
|
|
|
import com.fanruan.api.i18n.I18nKit; |
|
import com.fanruan.api.log.LogKit; |
|
import com.fr.plugin.context.PluginContext; |
|
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor; |
|
import com.fr.plugin.tabledataservice.webservice.StartServer; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <PluginMonitor> |
|
* |
|
* @author fr.open |
|
* @since 1.0.0 |
|
*/ |
|
public class PluginMonitor extends AbstractPluginLifecycleMonitor { |
|
public PluginMonitor() { |
|
} |
|
|
|
@Override |
|
public void afterRun(PluginContext pluginContext) { |
|
if (!pluginContext.isAvailable()) { |
|
LogKit.error(I18nKit.getLocText("Plugin-tabledataservice_Licence_Expired")); |
|
return; |
|
} |
|
boolean isStarted = StartServer.createServer(); |
|
if (isStarted) { |
|
LogKit.info("tabledataservice-PluginMonitor-[WS]服务启动成功"); |
|
} else { |
|
LogKit.info("tabledataservice-PluginMonitor-[WS]服务启动失败"); |
|
} |
|
} |
|
|
|
@Override |
|
public void beforeStop(PluginContext pluginContext) { |
|
|
|
} |
|
} |