System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath());
}
- /**
- * Retrieves all active plugins.
- */
public List<PluginWrapper> getPlugins() {
return new ArrayList<PluginWrapper>(plugins.values());
}
* Start all active plugins.
*/
public void startPlugins() {
- List<PluginWrapper> resolvedPlugins = getResolvedPlugins();
for (PluginWrapper pluginWrapper : resolvedPlugins) {
try {
LOG.info("Start plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'");
* Stop all active plugins.
*/
public void stopPlugins() {
- List<PluginWrapper> resolvedPlugins = getResolvedPlugins();
- for (PluginWrapper pluginWrapper : resolvedPlugins) {
+ for (PluginWrapper pluginWrapper : startedPlugins) {
try {
LOG.info("Stop plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'");
pluginWrapper.getPlugin().stop();