Class ScriptManager
- java.lang.Object
-
- org.apache.logging.log4j.core.script.ScriptManager
-
- All Implemented Interfaces:
FileWatcher
public class ScriptManager extends Object implements FileWatcher
Manages the scripts use by the Configuration.
-
-
Constructor Summary
Constructors Constructor Description ScriptManager(Configuration configuration, WatchManager watchManager, String scriptLanguages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addScript(AbstractScript script)
Bindings
createBindings(AbstractScript script)
Object
execute(String name, Bindings bindings)
void
fileModified(File file)
Called when aWatchManager
detects that the givenFile
changed.Set<String>
getAllowedLanguages()
AbstractScript
getScript(String name)
-
-
-
Constructor Detail
-
ScriptManager
public ScriptManager(Configuration configuration, WatchManager watchManager, String scriptLanguages)
-
-
Method Detail
-
addScript
public boolean addScript(AbstractScript script)
-
createBindings
public Bindings createBindings(AbstractScript script)
-
getScript
public AbstractScript getScript(String name)
-
fileModified
public void fileModified(File file)
Description copied from interface:FileWatcher
Called when aWatchManager
detects that the givenFile
changed.- Specified by:
fileModified
in interfaceFileWatcher
- Parameters:
file
- the file that changed.- See Also:
WatchManager
-
-