Package adams.core.scriptingengine
Class BackgroundScriptingEngineRegistry
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.scriptingengine.BackgroundScriptingEngineRegistry
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Serializable
public class BackgroundScriptingEngineRegistry extends CustomLoggingLevelObject
Registry for background scripting engines that need to be stopped before the application can terminate properly.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<BackgroundScriptingEngine>m_Enginesthe scripting engines.protected static BackgroundScriptingEngineRegistrym_Singletonthe singleton.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBackgroundScriptingEngineRegistry()Initializes the manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegister(BackgroundScriptingEngine engine)Deregisters the specified engine.static BackgroundScriptingEngineRegistrygetSingleton()Returns the singleton of the registry.protected voidinitializeLogging()Pre-configures the logging.voidregister(BackgroundScriptingEngine engine)Registers the specified engine.voidstopAllEngines()Stops all scripting engines.-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Engines
protected Set<BackgroundScriptingEngine> m_Engines
the scripting engines.
-
m_Singleton
protected static BackgroundScriptingEngineRegistry m_Singleton
the singleton.
-
-
Method Detail
-
initializeLogging
protected void initializeLogging()
Pre-configures the logging.- Overrides:
initializeLoggingin classLoggingObject
-
register
public void register(BackgroundScriptingEngine engine)
Registers the specified engine.- Parameters:
engine- the engine to register
-
deregister
public void deregister(BackgroundScriptingEngine engine)
Deregisters the specified engine.- Parameters:
engine- the engine to deregister
-
getSingleton
public static BackgroundScriptingEngineRegistry getSingleton()
Returns the singleton of the registry.- Returns:
- the registry
-
stopAllEngines
public void stopAllEngines()
Stops all scripting engines.
-
-