public class ConfigurationTimer extends Object
Use this class to monitor and automatically reload SmartInspect configuration files. This timer periodically checks if the related configuration file has changed (by comparing the last write time) and automatically tries to reload the configuration properties. You can pass the SmartInspect object to configure, the name of the configuration file to monitor and the interval in which this timer should check for changes.
For information about SmartInspect configuration files, please refer to the documentation of the SmartInspect.loadConfiguration method.
This class is fully threadsafe.
| Constructor and Description |
|---|
ConfigurationTimer(SmartInspect smartInspect,
String fileName,
int period)
Creates and initializes a new ConfigurationTimer object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
The method releases all resources of this ConfigurationTimer object
and stops monitoring the SmartInspect configuration file for
changes.
|
public ConfigurationTimer(SmartInspect smartInspect, String fileName, int period)
smartInspect - The SmartInspect object to configure.fileName - The name of the configuration file to monitor.period - The milliseconds interval in which this timer should check for changes.NullPointerException - if the smartInspect or fileName parameter is null.IllegalArgumentException - if the period parameter is negative.Copyright © 2023. All rights reserved.