@Incubating public abstract class AbstractCachingScriptEvaluatorFactory extends Object implements ScriptEvaluatorFactory
ScriptEvaluator
s. This
class is thread-safe. Caches ScriptEvaluator
when they are requested.Constructor and Description |
---|
AbstractCachingScriptEvaluatorFactory() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the state of the factory.
|
protected abstract ScriptEvaluator |
createNewScriptEvaluator(String languageName)
Creates a new script evaluator for the given language.
|
ScriptEvaluator |
getScriptEvaluatorByLanguageName(String languageName)
Retrieves a script executor for the given language.
|
public AbstractCachingScriptEvaluatorFactory()
public ScriptEvaluator getScriptEvaluatorByLanguageName(String languageName)
getScriptEvaluatorByLanguageName
in interface ScriptEvaluatorFactory
languageName
- the name of a scripting languageScriptEvaluatorNotFoundException
- in case no compatible evaluator for the given language has been foundpublic void clear()
ScriptEvaluatorFactory
Called when the ValidatorFactory
is closed.
clear
in interface ScriptEvaluatorFactory
protected abstract ScriptEvaluator createNewScriptEvaluator(String languageName) throws ScriptEvaluatorNotFoundException
languageName
- the name of a scripting languageScriptEvaluatorNotFoundException
- in case no compatible engine for the given language has been foundCopyright © 2021 JBoss by Red Hat. All rights reserved.