public abstract class SelfNamedPlugin extends Object
This is a superclass of all classes which are managed as self-named
plugins. They must extend SelfNamedPlugin or its
subclass.
Unfortunately, this has to be an abstract class because
an interface may not have static methods. The
pluginAliases method is static so it can be invoked
without creating an instance, and thus let the aliases live in the
class itself so there is no need for name mapping in a separate
configuration file.
See the documentation in the
PluginService class for more details.
PluginService| Constructor and Description |
|---|
SelfNamedPlugin() |
| Modifier and Type | Method and Description |
|---|---|
String |
getPluginInstanceName()
Get an instance's particular name.
|
static String[] |
getPluginNames()
Get the names of this plugin implementation.
|
protected void |
setPluginInstanceName(String name)
Set the name under which this plugin was instantiated.
|
public static String[] getPluginNames()
A name should be a short generic name illustrative of the
service, e.g. "PDF", "JPEG", "GIF"
for media filters.
Each name must be unique among all the plugins implementing any
given interface, but it can be the same as a name of
a plugin for a different interface. For example, two classes
may each have a "default" name if they do not
implement any of the same interfaces.
public String getPluginInstanceName()
PluginService, or if someone remembers to call setPluginName.
Useful when the implementation class wants to be configured differently when it is invoked under different names.
protected void setPluginInstanceName(String name)
PluginService.getNamedPlugin()
when the plugin is instantiated.name - -- name used to select this class.Copyright © 2022 LYRASIS. All rights reserved.