public abstract class PluginRegistry extends Object
Plugins must register themselves with the process wide singleton instance of this class.
Plugins should register before worker threads start, otherwise thread
listeners will not be created for existing threads. Typically a plugin will
want to initialise itself when a script imports one or more of its classes. A
static initialiser is a good way to achieve this - see the
net.grinder.plugin.http.HTTPPlugin
implementation for an example.
Constructor and Description |
---|
PluginRegistry() |
Modifier and Type | Method and Description |
---|---|
static PluginRegistry |
getInstance()
Singleton accessor.
|
abstract void |
register(GrinderPlugin plugin)
Used to register a new plugin.
|
protected static void |
setInstance(PluginRegistry pluginRegistry)
Set the singleton.
|
public static final PluginRegistry getInstance()
public abstract void register(GrinderPlugin plugin) throws GrinderException
plugin
- The plugin instance.GrinderException
- If an error occurs.protected static final void setInstance(PluginRegistry pluginRegistry)
pluginRegistry
- The singleton.Copyright © 2000-2014. All Rights Reserved.