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 boolean
isTaskRunning()
void
propertyDeleted(String property, Map<String,Object> params)
A property was deleted.void
propertySet(String property, Map<String,Object> params)
A property was set.void
runNow(boolean blockUntilDone)
Immediately run a check of the plugin directory.void
start()
Initialize the monitor.void
startMonitoring()
Start periodically checking the plugin directory.void
stop()
Shutdown the monitor.void
stopMonitoring()
Stop periodically checking the plugin directory.void
xmlPropertyDeleted(String property, Map<String,Object> params)
An XML property was deleted.void
xmlPropertySet(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:PropertyEventListener
A property was set. The parameter mapparams
will contain the the value of the property under the keyvalue
.- Specified by:
propertySet
in 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:PropertyEventListener
A property was deleted.- Specified by:
propertyDeleted
in 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:PropertyEventListener
An XML property was set. The parameter mapparams
will contain the the value of the property under the keyvalue
.- Specified by:
xmlPropertySet
in 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:PropertyEventListener
An XML property was deleted.- Specified by:
xmlPropertyDeleted
in interfacePropertyEventListener
- Parameters:
property
- the name of the property.params
- event parameters.
-
-