public class MRulesBuilder extends Object implements javax.rules.admin.RuleExecutionSetProvider, javax.rules.admin.LocalRuleExecutionSetProvider
IRuleEngineConfigHolder
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HASH |
Constructor and Description |
---|
MRulesBuilder()
Default constructor.
|
MRulesBuilder(Map<String,String> parameters)
Constructor with direct initialization of default parameters.
|
Modifier and Type | Method and Description |
---|---|
IMRuleExecutionSet |
createRuleExecutionSet(Element ruleExecutionSetElement,
Map parameters)
For JSR94 compatibility
|
IMRuleExecutionSet |
createRuleExecutionSet(InputStream ruleExecutionSetStream,
Map parameters)
For JSR94 compatibility
|
IMRuleExecutionSet |
createRuleExecutionSet(Object ruleExecutionSetAst,
Map parameters)
For JSR94 compatibility
|
IMRuleExecutionSet |
createRuleExecutionSet(Reader ruleExecutionSetReader,
Map parameters)
For JSR94 compatibility
|
IMRuleExecutionSet |
createRuleExecutionSet(Serializable ruleExecutionSetAst,
Map parameters)
For JSR94 compatibility
|
IMRuleExecutionSet |
createRuleExecutionSet(String uri,
Map parameters)
For JSR94 compatibility
|
protected IRuleEngineConfigHolder |
getConfig(Map<String,String> parameters,
boolean useGenericHolder,
boolean nofail)
Retrieves the configuration XML from the name.
|
Map<String,String> |
getDefaultParameters() |
IMRuleExecutionSet |
getRuleExecutionSetInstance()
Builds if necessary or retrieves from cache the requested engine instance, using the default parameters.
|
IMRuleExecutionSet |
getRuleExecutionSetInstance(Map<String,String> parameters)
Builds if necessary or retrieves from cache the requested engine instance, merging the default parameters
with the provided ones.
|
static List<String> |
getUris()
Get all URIs of cached rulesets.
|
static boolean |
putEngines(String uri,
Pair<String,IMRuleExecutionSet> engines)
Thread safely removing an instance from cache.
|
static boolean |
removeEngines(String uri)
Thread safely removing an instance from cache.
|
void |
setDefaultParameters(Map<String,String> defaultParameters) |
static void |
updateMetaData(Map<String,String> parameters,
IMRuleExecutionSet eng)
Updates URI.
|
public static final String DEFAULT_HASH
public MRulesBuilder()
public IMRuleExecutionSet createRuleExecutionSet(InputStream ruleExecutionSetStream, Map parameters) throws MRuleExecutionSetCreateException, IOException
createRuleExecutionSet
in interface javax.rules.admin.LocalRuleExecutionSetProvider
MRuleExecutionSetCreateException
IOException
public IMRuleExecutionSet createRuleExecutionSet(Reader ruleExecutionSetReader, Map parameters) throws javax.rules.admin.RuleExecutionSetCreateException, IOException
createRuleExecutionSet
in interface javax.rules.admin.LocalRuleExecutionSetProvider
javax.rules.admin.RuleExecutionSetCreateException
IOException
public IMRuleExecutionSet createRuleExecutionSet(Object ruleExecutionSetAst, Map parameters) throws javax.rules.admin.RuleExecutionSetCreateException
createRuleExecutionSet
in interface javax.rules.admin.LocalRuleExecutionSetProvider
javax.rules.admin.RuleExecutionSetCreateException
public IMRuleExecutionSet createRuleExecutionSet(Element ruleExecutionSetElement, Map parameters) throws javax.rules.admin.RuleExecutionSetCreateException, RemoteException
createRuleExecutionSet
in interface javax.rules.admin.RuleExecutionSetProvider
javax.rules.admin.RuleExecutionSetCreateException
RemoteException
public IMRuleExecutionSet createRuleExecutionSet(Serializable ruleExecutionSetAst, Map parameters) throws javax.rules.admin.RuleExecutionSetCreateException, RemoteException
createRuleExecutionSet
in interface javax.rules.admin.RuleExecutionSetProvider
javax.rules.admin.RuleExecutionSetCreateException
RemoteException
public IMRuleExecutionSet createRuleExecutionSet(String uri, Map parameters) throws MRuleExecutionSetCreateException
createRuleExecutionSet
in interface javax.rules.admin.RuleExecutionSetProvider
MRuleExecutionSetCreateException
public IMRuleExecutionSet getRuleExecutionSetInstance() throws MConfigurationException
MConfigurationException
public IMRuleExecutionSet getRuleExecutionSetInstance(Map<String,String> parameters) throws MConfigurationException
MConfigurationException
public static void updateMetaData(Map<String,String> parameters, IMRuleExecutionSet eng)
public static boolean putEngines(String uri, Pair<String,IMRuleExecutionSet> engines)
public static boolean removeEngines(String uri)
protected IRuleEngineConfigHolder getConfig(Map<String,String> parameters, boolean useGenericHolder, boolean nofail) throws MConfigurationException
useGenericHolder
- if configholder_impl parameter is omitted, use GenericRuleEngineConfigHolder
?nofail
- If holder can't be built, will fail or return null depending on this flag's value.MConfigurationException