public class EvaluatorFactory extends Object
EvaluatorProvider
s by supported SCXML datamodel type.
The EvaluatorFactory is used to automatically create an Evaluator
instance for an SCXML
statemachine when none has been pre-defined and configured for the SCXMLExecutor
.
The builtin supported providers are:
JexlEvaluator.JexlEvaluatorProvider
JSEvaluator.JSEvaluatorProvider
GroovyEvaluator.GroovyEvaluatorProvider
XPathEvaluator.XPathEvaluatorProvider
MinimalEvaluator.MinimalEvaluatorProvider
For adding additional or overriding the builtin Evaluator implementations use
registerEvaluatorProvider(EvaluatorProvider)
or unregisterEvaluatorProvider(String)
.
The default provider can be overridden using the setDefaultProvider(EvaluatorProvider)
which will
register the provider under the Evaluator.DEFAULT_DATA_MODEL
("") value for the datamodel.
Note: this is not the same as datamodel="null"!
Modifier and Type | Method and Description |
---|---|
static EvaluatorProvider |
getDefaultProvider() |
static Evaluator |
getEvaluator(SCXML document)
Returns a dedicated Evaluator instance for a specific SCXML document its documentmodel.
|
static EvaluatorProvider |
getEvaluatorProvider(String datamodelName) |
static void |
registerEvaluatorProvider(EvaluatorProvider provider) |
static void |
setDefaultProvider(EvaluatorProvider defaultProvider) |
static void |
unregisterEvaluatorProvider(String datamodelName) |
public static void setDefaultProvider(EvaluatorProvider defaultProvider)
public static EvaluatorProvider getDefaultProvider()
public static EvaluatorProvider getEvaluatorProvider(String datamodelName)
public static void registerEvaluatorProvider(EvaluatorProvider provider)
public static void unregisterEvaluatorProvider(String datamodelName)
public static Evaluator getEvaluator(SCXML document) throws ModelException
If no SCXML document is provided a default Evaluator will be returned.
document
- The document to return a dedicated Evaluator for. May be null to retrieve the default Evaluator.ModelException
- If the SCXML document datamodel is not supported.Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.