Package net.i2p.router.web
Class PluginStarter
java.lang.Object
net.i2p.router.web.PluginStarter
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PluginStopper
Start/stop/delete plugins that are already installed
Get properties of installed plugins
Get or change settings in plugins.config
- Since:
- 0.7.12
- Author:
- zzz
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RouterContextstatic final Stringstatic final StringPlugin name to plugin version of plugins that do not work with Java 9+ Unmodifiable.Plugin name to plugin version of plugins that do not work with Jetty 9, but do not have a max-jetty-version=8.9999 set.static final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandeletePlugin(RouterContext ctx, String appName) static voiddisablePlugin(String appName) Disable in plugins.configThe signing keys from all the pluginsall installed plugins whether enabled or not, but does NOT include plugins marked as deleted.static booleanisPluginEnabled(String appName) Is the plugin enabled in plugins.config? Default truestatic booleanisPluginRunning(String pluginName, RouterContext ctx) protected static booleanisPluginRunning(String pluginName, RouterContext ctx, Server s) static Propertiesplugins.config this auto-adds a property for every dir in the plugin directorystatic PropertiespluginProperties(I2PAppContext ctx, String appName) plugin.configstatic booleanvoidrun()static booleanstartPlugin(RouterContext ctx, String appName) (package private) static voidthis shouldn't throw anythingstatic booleanstopPlugin(RouterContext ctx, String appName) protected static booleanstopPlugin(RouterContext ctx, Server s, String appName) static voidstorePluginProperties(Properties props) plugins.configstatic StringstripHTML(Properties props, String key) Like in DataHelper but doesn't convert null to "" There's a lot worse things a plugin could do but...static voidupdateAll(RouterContext ctx) threaded
-
Field Details
-
_context
-
PREFIX
- See Also:
-
ENABLED
- See Also:
-
DELETED
- See Also:
-
PLUGIN_DIR
- See Also:
-
jetty9Blacklist
Plugin name to plugin version of plugins that do not work with Jetty 9, but do not have a max-jetty-version=8.9999 set. Unmodifiable.- Since:
- 0.9.30
-
java9Blacklist
Plugin name to plugin version of plugins that do not work with Java 9+ Unmodifiable.- Since:
- 0.9.30
-
-
Constructor Details
-
PluginStarter
-
-
Method Details
-
pluginsEnabled
- Since:
- public since 0.9.33, was package private
-
run
public void run() -
updateAll
threaded- Since:
- 0.8.13, public since 0.9.33, was package private
-
startPlugins
this shouldn't throw anything -
startPlugin
- Returns:
- true on success
- Throws:
Exception- just about anything, caller would be wise to catch Throwable
-
stopPlugin
- Returns:
- true on success
- Throws:
Exception- just about anything, caller would be wise to catch Throwable
-
stopPlugin
- Returns:
- true on success
- Throws:
Exception- just about anything, caller would be wise to catch Throwable- Since:
- 0.9.41
-
deletePlugin
- Returns:
- true on success - caller should call stopPlugin() first
- Throws:
Exception- Since:
- public since 0.9.33, was package private
-
pluginProperties
plugin.config -
pluginProperties
plugins.config this auto-adds a property for every dir in the plugin directory -
isPluginEnabled
Is the plugin enabled in plugins.config? Default true- Since:
- 0.8.13
-
disablePlugin
Disable in plugins.config- Since:
- 0.8.13
-
getPlugins
all installed plugins whether enabled or not, but does NOT include plugins marked as deleted.- Returns:
- non-null, sorted, modifiable
-
getPluginKeys
The signing keys from all the plugins- Returns:
- Map of key to keyname Last one wins if a dup (installer should prevent dups)
-
storePluginProperties
plugins.config -
isPluginRunning
-
isPluginRunning
- Since:
- 0.9.41
-
stripHTML
Like in DataHelper but doesn't convert null to "" There's a lot worse things a plugin could do but...- Since:
- moved from ConfigClientsHelper in 0.9.33
-