public interface Plugin
MANIFEST_ATTRIBUTE_PLUGIN
and putting it in the classpath. The other is by setting a system property
SYSPROP_PLUGIN to the plugin class.Integration,
Configuration,
Reloader,
Logger| Modifier and Type | Field and Description |
|---|---|
static String |
MANIFEST_ATTRIBUTE_PLUGIN
This JAR MANIFEST.MF attribute should point to a class name that implements
this interface.
|
static String |
SYSPROP_PLUGIN
This system property should point to a class name that implements
this interface.
|
static String |
SYSPROP_PLUGINS
This system property should point to comma-separated list of 2.0 plugin jars that
implement the
checkDependencies(ClassLoader, ClassResourceSource) method. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDependencies(ClassLoader cl,
ClassResourceSource crs)
Check that the plugin dependencies are present in the tested classloader.
|
String |
getAuthor()
The name of the person/entity that contributed the plugin.
|
String |
getDescription()
Description of the plugin, a few lines about purpose and functionality of the plugin.
|
String |
getId()
A Unix-like id, e.g.
|
String |
getName()
Name of the plugin, optionally with a version, e.g.
|
String |
getSupportedVersions()
Text description of supported versions of the framework the plug-in is for.
|
String |
getTestedVersions()
Text description of tested versions of the framework the plug-in is for.
|
String |
getWebsite()
The URL to the website with information about the plugin.
|
void |
preinit()
Called before the first class in the host classloader is loaded.
|
static final String SYSPROP_PLUGIN
-Drebel.plugin=com.mycompany.mypackage.MyJRebelPlugin.static final String MANIFEST_ATTRIBUTE_PLUGIN
static final String SYSPROP_PLUGINS
checkDependencies(ClassLoader, ClassResourceSource) method.
-Drebel.plugins=/path/to/plugin1.jar,/path/to/plugin2.jar.void preinit()
boolean checkDependencies(ClassLoader cl, ClassResourceSource crs)
ClassResourceSource.getClassResource(String)
to test for class presence, e.g.
return crs.getClassResourceSource("org.myframework.MyClass") != null;.
To test whether the implementation is correct add your plugin jar to -Drebel.plugins.
If your plugin is found it will be initialized by JRebel in correct classloader.String getId()
String getName()
String getDescription()
String getAuthor()
String getWebsite()
String getSupportedVersions()
String getTestedVersions()
Copyright © 2019. All rights reserved.