Class Plugin<T>
java.lang.Object
de.iip_ecosphere.platform.support.plugins.Plugin<T>
- Type Parameters:
T- the type of the implementing class
- Direct Known Subclasses:
SingletonPlugin
Represents a plugin.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
-
ids
-
instanceCls
-
creator
-
installDir
-
-
Constructor Details
-
Plugin
public Plugin(String id, List<String> ids, Class<T> instanceCls, Function<Plugin<T>, T> creator, File installDir) Creates a plugin instance.- Parameters:
id- the primary plugin idids- further (optional) ids, may be empty or nullinstanceCls- the instance classcreator- the creator supplierinstallDir- the installation directory, may be null
-
-
Method Details
-
getId
Returns the unique/primary plugin id. Shall comply with the correspondingPluginDescriptor.- Returns:
- the id
-
getFurtherIds
Returns further ids. Shall comply with the correspondingPluginDescriptor.- Returns:
- the further ids, may be null, empty, unmodifiable
-
getAllIds
Returns the primary and all secondary ids.- Returns:
- the ids
-
getInstanceClass
Returns the type of the implementing class.- Returns:
- the implementing class type
-
getInstance
Returns the implementing class.- Returns:
- the implementing class
-
cleanup
public void cleanup()Cleans up this plugin. -
getInstallDir
Returns the installation directory.- Returns:
- the directory, may be null
-