@Plugin(name="http", category="Watcher", elementType="watcher", printObject=true) @PluginAliases(value="https") public class HttpWatcher extends AbstractWatcher
AbstractWatcher.ReconfigurationRunnable
CATEGORY, ELEMENT_TYPE
Constructor and Description |
---|
HttpWatcher(Configuration configuration,
Reconfigurable reconfigurable,
List<ConfigurationListener> configurationListeners,
long lastModifiedMillis) |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Returns the time the source was last modified or 0 if it is not available.
|
boolean |
isModified()
Periodically called to determine if the configuration has been modified.
|
Watcher |
newWatcher(Reconfigurable reconfigurable,
List<ConfigurationListener> listeners,
long lastModifiedMillis)
Creates a new Watcher by copying the original and using the new Reconfigurable and listeners.
|
void |
watching(Source source)
Called when the Watcher is registered.
|
getConfiguration, getListeners, getSource, modified
public HttpWatcher(Configuration configuration, Reconfigurable reconfigurable, List<ConfigurationListener> configurationListeners, long lastModifiedMillis)
public long getLastModified()
Watcher
getLastModified
in interface Watcher
getLastModified
in class AbstractWatcher
public boolean isModified()
Watcher
isModified
in interface Watcher
isModified
in class AbstractWatcher
public void watching(Source source)
Watcher
watching
in interface Watcher
watching
in class AbstractWatcher
source
- the Source that is being watched.public Watcher newWatcher(Reconfigurable reconfigurable, List<ConfigurationListener> listeners, long lastModifiedMillis)
Watcher
reconfigurable
- The Reconfigurable.listeners
- the listeners.lastModifiedMillis
- The time the resource was last modified in milliseconds.Copyright © 1999-2021 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.