public class DefaultPluginFactory extends Object implements PluginFactory
| 构造器和说明 |
|---|
DefaultPluginFactory(org.springframework.context.ApplicationContext applicationContext) |
DefaultPluginFactory(org.springframework.context.ApplicationContext applicationContext,
PluginListenerFactory pluginListenerFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T extends PluginListener> |
addListener(Class<T> pluginListenerClass)
添加监听者
|
void |
addListener(List<PluginListener> pluginListeners)
追加多个监听者
|
void |
addListener(PluginListener pluginListener)
添加监听者
|
void |
build()
注册或者注销后的构建调用
|
void |
initialize()
工厂初始化
|
PluginFactory |
registry(org.pf4j.PluginWrapper pluginWrapper)
注册插件。
|
PluginFactory |
unRegistry(String pluginId)
注销插件。
|
public DefaultPluginFactory(org.springframework.context.ApplicationContext applicationContext)
public DefaultPluginFactory(org.springframework.context.ApplicationContext applicationContext,
PluginListenerFactory pluginListenerFactory)
public void initialize()
throws Exception
PluginFactoryinitialize 在接口中 PluginFactoryException - 初始化异常public PluginFactory registry(org.pf4j.PluginWrapper pluginWrapper) throws Exception
PluginFactoryregistry 在接口中 PluginFactorypluginWrapper - 插件Exception - 插件工厂异常public PluginFactory unRegistry(String pluginId) throws Exception
PluginFactoryunRegistry 在接口中 PluginFactorypluginId - 插件idException - 插件工厂异常public void build()
throws Exception
PluginFactorybuild 在接口中 PluginFactoryException - 插件工厂异常public void addListener(PluginListener pluginListener)
PluginListenerContextaddListener 在接口中 PluginListenerContextpluginListener - 插件 bean 监听者public <T extends PluginListener> void addListener(Class<T> pluginListenerClass)
PluginListenerContextaddListener 在接口中 PluginListenerContextT - 继承PluginListener的子类pluginListenerClass - 插件监听者Class类public void addListener(List<PluginListener> pluginListeners)
PluginListenerContextaddListener 在接口中 PluginListenerContextpluginListeners - 插件 bean 监听者集合Copyright © 2019. All rights reserved.