|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Plugin
Represents a JavaRebel plugin that can be used by a third-party
to configure or integrate with JavaRebel. Will be called before the
first class is loaded in the host classloader.
There are two ways to register a JavaRebel plugin. One is by creating
a JAR file with a custom manifest entry 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| Field Summary | |
|---|---|
static java.lang.String |
MANIFEST_ATTRIBUTE_PLUGIN
This JAR MANIFEST.MF attribute should point to a class name that implements this interface. |
static java.lang.String |
SYSPROP_PLUGIN
This system property should point to a class name that implements this interface. |
static java.lang.String |
SYSPROP_PLUGINS
This system property should point to comma-separated list of 2.0 plugin jars that implement the checkDependencies(ClassLoader, ClassResourceSource) method. |
| Method Summary | |
|---|---|
boolean |
checkDependencies(java.lang.ClassLoader cl,
ClassResourceSource crs)
This method is necessary to embed the plugin into JavaRebel distribution, it is not necessary for the plugins in the classpath. |
java.lang.String |
getAuthor()
The name of the person/entity that contributed the plugin. |
java.lang.String |
getDescription()
Description of the plugin, a few lines about purpose and functionality of the plugin. |
java.lang.String |
getId()
A Unix-like id, e.g. |
java.lang.String |
getName()
Name of the plugin, optionally with a version, e.g. |
java.lang.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. |
| Field Detail |
|---|
static final java.lang.String SYSPROP_PLUGIN
-Drebel.plugin=com.mycompany.mypackage.MyJavaRebelPlugin.
static final java.lang.String MANIFEST_ATTRIBUTE_PLUGIN
static final java.lang.String SYSPROP_PLUGINS
checkDependencies(ClassLoader, ClassResourceSource) method.
-Drebel.plugins=/path/to/plugin1.jar,/path/to/plugin2.jar.
| Method Detail |
|---|
void preinit()
boolean checkDependencies(java.lang.ClassLoader cl,
ClassResourceSource crs)
ClassResourceSource.getClassResource(String)
to test for class presense, e.g.
return crs.getClassResourceSource("org.myframework.MyClass") != null;.
To test whether the implementation is correct add your plugin jar to -Drebel.plugins
and remove it from the classpath. If your plugin is found it will be initialized by JavaRebel
in correct classloader.
java.lang.String getId()
java.lang.String getName()
java.lang.String getDescription()
java.lang.String getAuthor()
java.lang.String getWebsite()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||