public class CORSConfigurationFileWatcher extends Object implements CORSConfigurationWatcher
The file system is polled every 20 seconds. This can be overridden by setting a
cors.configFilePollInterval system property to the desired value
(in seconds).
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_POLL_INTERVAL_SECONDS
The default poll interval (and initial poll delay), in seconds.
|
static String |
POLL_INTERVAL_PARAM_NAME
The system property name for the configuration file poll interval,
in seconds.
|
| Constructor and Description |
|---|
CORSConfigurationFileWatcher(javax.servlet.FilterConfig filterConfig)
Creates a new CORS filter configuration watcher.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPollIntervalSeconds()
Gets the configured poll interval.
|
boolean |
reloadRequired()
Checks if the CORS filter configuration has changed and must be
reloaded.
|
void |
reset()
Resets watching.
|
void |
start()
Start watching for changes.
|
void |
stop()
Stop watching for changes.
|
public static final String POLL_INTERVAL_PARAM_NAME
public static final long DEFAULT_POLL_INTERVAL_SECONDS
public CORSConfigurationFileWatcher(javax.servlet.FilterConfig filterConfig)
filterConfig - The filter configuration. Must not be
null.public void start()
CORSConfigurationWatcherstart in interface CORSConfigurationWatcherpublic boolean reloadRequired()
CORSConfigurationWatcherreloadRequired in interface CORSConfigurationWatchertrue if the CORS filter configuration must be
reloaded.public void stop()
CORSConfigurationWatcherstop in interface CORSConfigurationWatcherpublic void reset()
CORSConfigurationWatcherreset in interface CORSConfigurationWatcherpublic long getPollIntervalSeconds()
Copyright © 2010–2019 The Transaction Company. All rights reserved.