public interface Configurable
ScriptEngineFactory implementations so that providers of new scripting
language from modules can have the opportunity to perform set up or clean up operations when the bundle is started
and/or stopped.| Modifier and Type | Method and Description |
|---|---|
void |
configurePreRegistration(org.osgi.framework.Bundle bundle)
Configures the
ScriptEngineFactory when its bundle is started but before it is registered with the
BundleScriptResolver. |
void |
configurePreScriptEngineCreation()
Configures this
ScriptEngineFactory if needed right before a ScriptEngine
instance is created. |
void |
destroy(org.osgi.framework.Bundle bundle)
Performs any clean up operations when the bundle this factory was loaded from is stopped.
|
void configurePreRegistration(org.osgi.framework.Bundle bundle)
ScriptEngineFactory when its bundle is started but before it is registered with the
BundleScriptResolver. Note that this means that Spring context is not available at this time.bundle - the bundle the factory was loaded fromvoid destroy(org.osgi.framework.Bundle bundle)
bundle - the bundle the factory was loaded fromvoid configurePreScriptEngineCreation()
ScriptEngineFactory if needed right before a ScriptEngine
instance is created. This is useful when some configuration details are not yet available when the bundle that
declared it is started (e.g. when the configuration is in a Spring context that is not yet available during
module startup).
Note that this method is called each time a ScriptEngine instance is retrieved so it needs
to be efficient, be thread-safe and guard against multiple calls when the configuration needs to happen only
once.Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.