Class PluginMonitor
- java.lang.Object
-
- org.jivesoftware.openfire.container.PluginMonitor
-
- All Implemented Interfaces:
PropertyEventListener
public class PluginMonitor extends Object implements PropertyEventListener
A service that monitors the plugin directory for plugins. It periodically checks for new plugin JAR files and extracts them if they haven't already been extracted. Then, any new plugin directories are loaded, using the PluginManager.- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
-
-
Constructor Summary
Constructors Constructor Description PluginMonitor(PluginManager pluginManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisTaskRunning()voidpropertyDeleted(String property, Map<String,Object> params)A property was deleted.voidpropertySet(String property, Map<String,Object> params)A property was set.voidrunNow(boolean blockUntilDone)Immediately run a check of the plugin directory.voidstart()Initialize the monitor.voidstartMonitoring()Start periodically checking the plugin directory.voidstop()Shutdown the monitor.voidstopMonitoring()Stop periodically checking the plugin directory.voidxmlPropertyDeleted(String property, Map<String,Object> params)An XML property was deleted.voidxmlPropertySet(String property, Map<String,Object> params)An XML property was set.
-
-
-
Constructor Detail
-
PluginMonitor
public PluginMonitor(PluginManager pluginManager)
-
-
Method Detail
-
start
public void start()
Initialize the monitor.
-
startMonitoring
public void startMonitoring()
Start periodically checking the plugin directory.
-
stop
public void stop()
Shutdown the monitor.
-
stopMonitoring
public void stopMonitoring()
Stop periodically checking the plugin directory.
-
isTaskRunning
public boolean isTaskRunning()
-
runNow
public void runNow(boolean blockUntilDone)
Immediately run a check of the plugin directory.- Parameters:
blockUntilDone- {code true} to wait until the check is complete, otherwisefalse
-
propertySet
public void propertySet(String property, Map<String,Object> params)
Description copied from interface:PropertyEventListenerA property was set. The parameter mapparamswill contain the the value of the property under the keyvalue.- Specified by:
propertySetin interfacePropertyEventListener- Parameters:
property- the name of the property.params- event parameters.
-
propertyDeleted
public void propertyDeleted(String property, Map<String,Object> params)
Description copied from interface:PropertyEventListenerA property was deleted.- Specified by:
propertyDeletedin interfacePropertyEventListener- Parameters:
property- the name of the property deleted.params- event parameters.
-
xmlPropertySet
public void xmlPropertySet(String property, Map<String,Object> params)
Description copied from interface:PropertyEventListenerAn XML property was set. The parameter mapparamswill contain the the value of the property under the keyvalue.- Specified by:
xmlPropertySetin interfacePropertyEventListener- Parameters:
property- the name of the property.params- event parameters.
-
xmlPropertyDeleted
public void xmlPropertyDeleted(String property, Map<String,Object> params)
Description copied from interface:PropertyEventListenerAn XML property was deleted.- Specified by:
xmlPropertyDeletedin interfacePropertyEventListener- Parameters:
property- the name of the property.params- event parameters.
-
-