public final class PluginRegistry
extends java.lang.Object
Constructor and Description |
---|
PluginRegistry(LoggerRepositoryEx repository)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addPlugin(Plugin plugin)
Adds a plugin to the plugin registry.
|
void |
addPluginListener(PluginListener l)
Adds a PluginListener to this registry to be notified
of PluginEvents.
|
LoggerRepositoryEx |
getLoggerRepository()
Get logger repository.
|
java.util.List |
getPlugins()
Returns all the plugins for a given repository.
|
java.util.List |
getPlugins(java.lang.Class pluginClass)
Returns all the plugins for a given repository that are instances
of a certain class.
|
boolean |
pluginNameExists(java.lang.String name)
Returns true if the specified name is already taken by
an existing Plugin registered within the scope of the specified
LoggerRepository.
|
void |
removePluginListener(PluginListener l)
Removes a particular PluginListener from this registry
such that it will no longer be notified of PluginEvents.
|
void |
stopAllPlugins()
Stops all plugins in the given logger repository.
|
Plugin |
stopPlugin(java.lang.String pluginName)
Stops a plugin by plugin name and repository.
|
public PluginRegistry(LoggerRepositoryEx repository)
repository
- logger repository.public LoggerRepositoryEx getLoggerRepository()
public boolean pluginNameExists(java.lang.String name)
name
- The name to check the repository forpublic void addPlugin(Plugin plugin)
plugin
- the plugin to add.public java.util.List getPlugins()
public java.util.List getPlugins(java.lang.Class pluginClass)
pluginClass
- the class the plugin must implement to be selected.public Plugin stopPlugin(java.lang.String pluginName)
pluginName
- the name of the plugin to stop.public void stopAllPlugins()
public void addPluginListener(PluginListener l)
l
- PluginListener to add to this registrypublic void removePluginListener(PluginListener l)
l
- PluginListener to removeCopyright © 2018. All rights reserved.