Class HttpWatcher
java.lang.Object
org.apache.logging.log4j.core.util.AbstractWatcher
org.apache.logging.log4j.core.config.HttpWatcher
- All Implemented Interfaces:
Watcher
@Plugin(name="http",
category="Watcher",
elementType="watcher",
printObject=true)
@PluginAliases("https")
public class HttpWatcher
extends AbstractWatcher
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.util.AbstractWatcher
AbstractWatcher.ReconfigurationRunnable -
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.util.Watcher
CATEGORY, ELEMENT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionHttpWatcher(Configuration configuration, Reconfigurable reconfigurable, List<ConfigurationListener> configurationListeners, long lastModifiedMillis) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time the source was last modified or 0 if it is not available.booleanPeriodically called to determine if the configuration has been modified.newWatcher(Reconfigurable reconfigurable, List<ConfigurationListener> listeners, long lastModifiedMillis) Creates a new Watcher by copying the original and using the new Reconfigurable and listeners.voidCalled when the Watcher is registered.Methods inherited from class org.apache.logging.log4j.core.util.AbstractWatcher
getConfiguration, getListeners, getSource, modified
-
Constructor Details
-
HttpWatcher
public HttpWatcher(Configuration configuration, Reconfigurable reconfigurable, List<ConfigurationListener> configurationListeners, long lastModifiedMillis)
-
-
Method Details
-
getLastModified
public long getLastModified()Description copied from interface:WatcherReturns the time the source was last modified or 0 if it is not available.- Specified by:
getLastModifiedin interfaceWatcher- Specified by:
getLastModifiedin classAbstractWatcher- Returns:
- the time the source was last modified.
-
isModified
public boolean isModified()Description copied from interface:WatcherPeriodically called to determine if the configuration has been modified.- Specified by:
isModifiedin interfaceWatcher- Specified by:
isModifiedin classAbstractWatcher- Returns:
- true if the configuration was modified, false otherwise.
-
watching
Description copied from interface:WatcherCalled when the Watcher is registered.- Specified by:
watchingin interfaceWatcher- Overrides:
watchingin classAbstractWatcher- Parameters:
source- the Source that is being watched.
-
newWatcher
public Watcher newWatcher(Reconfigurable reconfigurable, List<ConfigurationListener> listeners, long lastModifiedMillis) Description copied from interface:WatcherCreates a new Watcher by copying the original and using the new Reconfigurable and listeners.- Parameters:
reconfigurable- The Reconfigurable.listeners- the listeners.lastModifiedMillis- The time the resource was last modified in milliseconds.- Returns:
- A new Watcher.
-