@Component public class DefaultPluginManger extends Object implements PluginManger
| 限定符和类型 | 字段和说明 |
|---|---|
protected HashMap<String,PluginWrapper> |
pluginWrapperHashMap
插件map Id,Plugin
|
| 构造器和说明 |
|---|
DefaultPluginManger() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
void |
autoLoadInstallPlug()
主程序 启动时是否自动加载以安装的插件
|
boolean |
containsPlugInstall(String pluginId)
插件是否安装
|
boolean |
containsPlugRun(String pluginId)
是否运行
|
List<PluginDbInfo> |
getInstallInfo()
获取插件安装信息
|
List<PluginWrapper> |
getPluginRunning()
获取正在运行中的插件
|
PluginWrapper |
getRunningPlug(String pluginId)
获取运行的插件
|
PluginWrapper |
install(byte[] bytes)
安装插件
|
void |
start(String pluginId)
启动插件
|
void |
stop(String pluginId)
停止插件
|
void |
sysStop(org.springframework.context.event.ContextClosedEvent batchSendCouponEvent)
系统停止
|
void |
uninstall(String pluginId)
卸载插件
|
PluginWrapper |
update(byte[] bytes,
String pluginId)
更新插件
|
protected HashMap<String,PluginWrapper> pluginWrapperHashMap
public PluginWrapper install(byte[] bytes) throws IOException, PluginLoadException, PluginInstallException
PluginMangerinstall 在接口中 PluginMangerbytes - 插件byteIOException - IOExceptionPluginLoadException - 插件加载异常PluginInstallException - 插件安装异常public PluginWrapper update(byte[] bytes, String pluginId) throws IOException, PluginLoadException, PluginUpdateException
PluginMangerupdate 在接口中 PluginMangerbytes - 插件bytepluginId - 插件idIOException - IOExceptionPluginLoadException - 插件加载异常PluginUpdateException - 插件更新异常public List<PluginDbInfo> getInstallInfo() throws IOException
PluginMangergetInstallInfo 在接口中 PluginMangerIOException - IOExceptionpublic PluginWrapper getRunningPlug(String pluginId)
PluginMangergetRunningPlug 在接口中 PluginMangerpluginId - 插件Idpublic boolean containsPlugInstall(String pluginId) throws IOException
PluginMangercontainsPlugInstall 在接口中 PluginMangerpluginId - 插件IdIOException - IOExceptionpublic boolean containsPlugRun(String pluginId)
PluginMangercontainsPlugRun 在接口中 PluginMangerpluginId - 插件Idpublic List<PluginWrapper> getPluginRunning()
PluginMangergetPluginRunning 在接口中 PluginMangerpublic void autoLoadInstallPlug()
throws IOException,
PluginLoadException
PluginMangerautoLoadInstallPlug 在接口中 PluginMangerIOException - IOExceptionPluginLoadException - 插件加载异常public void start(String pluginId) throws IOException, PluginLoadException
PluginMangerstart 在接口中 PluginMangerpluginId - 插件IdIOException - IOExceptionPluginLoadException - PluginLoadExceptionpublic void stop(String pluginId) throws IOException
PluginMangerstop 在接口中 PluginMangerpluginId - 插件IdIOException - IOExceptionpublic void uninstall(String pluginId) throws IOException
PluginMangeruninstall 在接口中 PluginMangerpluginId - 插件IdIOException - IOException@EventListener public void sysStop(org.springframework.context.event.ContextClosedEvent batchSendCouponEvent)
PluginMangersysStop 在接口中 PluginMangerbatchSendCouponEvent - ContextClosedEventCopyright © 2020. All rights reserved.