public class PluginLoader extends Object
Constructor and Description |
---|
PluginLoader(PropFactory factory,
ClassLoader classLoader)
Creates the instance.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
createClassLoader(ClassLoader parentClassLoader)
Creates a new classloader that also handles loading classes from the added plugins.
|
String |
getLoadedPlugins()
Gets the comma-separated list of loaded plugins.
|
List<IPluginDescriptor<?>> |
loadPlugins(String names)
Loads required plug-in's.
|
public PluginLoader(PropFactory factory, ClassLoader classLoader)
factory
- The factory to register the plug-ins in.classLoader
- The ClassLoader to use when running in a Server environment.public List<IPluginDescriptor<?>> loadPlugins(String names) throws IOException
Each plug-in must have a class called "name.server.Descriptor" that implement the interface
com.iizix.IPluginDescriptor
available.
The plug-in definition should be found at the "name/schema/properties.xml", but the iiziGo modules have the "iizigo" module instead of "iizix". To figure out translation of names, a class called "name.server.Descriptor" is loaded and should implement the interface
names
- The plug-in name, e.g. "com.iizigo.db,com.iizigo.term,com.iizigo.ws".IOException
- If a plug-in failed to load.public String getLoadedPlugins()
public ClassLoader createClassLoader(ClassLoader parentClassLoader)
parentClassLoader
- The parent class loaders, must be defined.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.