public class SimplePluginPlatform extends Object implements PluginPlatform
PluginPlatform interface. It manually
loads all jars and puts all classes in the classpath for the application.| Constructor and Description |
|---|
SimplePluginPlatform() |
| Modifier and Type | Method and Description |
|---|---|
PluginRegistry |
getPluginRegistry()
Returns the plugin registry of this platform.
|
void |
init()
Initializes this plugin platform.
|
<T extends CoreAPI> |
loadPlugins(String path,
HostApplication<T> application)
Loads plugins found in the path provided.
|
void |
stop()
Stops this plugin platform.
|
public void init()
throws PlatformException
PluginPlatforminit in interface PluginPlatformPlatformException - If there's any error while initializing this platform.public <T extends CoreAPI> boolean loadPlugins(String path, HostApplication<T> application) throws PlatformException
PluginPlatformPluginRegistry. If the path refers to a single jar file, on the
other hand, then only that file will be loaded.loadPlugins in interface PluginPlatformT - The type of the CoreAPI associated with the host
application.path - The path from where the plugins should be loaded from, or the
path to the jar file of a plugin.application - The application where the plugins to be loaded will be hosted.PlatformException - If there's any error while loading the plugins.public void stop()
throws PlatformException
PluginPlatformstop in interface PluginPlatformPlatformException - If there's any error while stopping this platform.public PluginRegistry getPluginRegistry()
PluginPlatformgetPluginRegistry in interface PluginPlatformPluginRegistryCopyright © 2014. All rights reserved.