public class PluginRegistar extends Object
Modifier and Type | Method and Description |
---|---|
static PluginRegistar |
getInstance(String mkConfigContextKey)
Returns a singleton instance of the PluginRegistar for each given
configuration context instance (there can be one context for each virtual
host using the service-proxy)
|
Plugin |
getPluginInstance(String name)
Create an instance of a plugin registered under a given name.
|
void |
loadRegistration(com.indexdata.masterkey.config.ModuleConfiguration mkConfigPlugins)
Load (append) registration data (name=fully-qualified-classname mappings)
from properties
|
void |
register(String name,
Class clazz)
Register a plugin (specified by the class object) under a given name (e.g.
|
void |
unregister(String name)
Unregister plugin referenced by a given name (if no component found a noop)
|
public static PluginRegistar getInstance(String mkConfigContextKey)
mkConfigContextKey
- public void loadRegistration(com.indexdata.masterkey.config.ModuleConfiguration mkConfigPlugins) throws PluginRegistrationException
props
- ClassNotFoundException
- if a class was not foundPluginRegistrationException
- if a registartion name is in usepublic void register(String name, Class clazz) throws PluginRegistrationException
name
- registration nameclazz
- class object for the given componentPluginRegistrationException
- if a given name is already in usepublic void unregister(String name)
name
- registartion namepublic Plugin getPluginInstance(String name) throws PluginInstantiationException
name
- registration namePluginInstantiationException
- if the instantiation failedCopyright © 2008-2015 Index Data. All Rights Reserved.