Rule Execution Server API

ilog.rules.res.model.mbean
Interface IlrJMXRepositoryMBean


public interface IlrJMXRepositoryMBean

Represents the entry point for the Rule Execution Server management model.

The Rule Execution Server model allows you to create, list, and remove RuleApps. It also provides facilities for processing and retrieving RuleApp archives.

See Also:
IlrJMXRulesetMBean, IlrJMXRuleAppMBean

Field Summary
static String VALUE_TYPE
          The type used in the objectName of the model MBean.
 
Method Summary
 ObjectName addRuleApp(String ruleAppName, String ruleAppVersion)
          Returns a RuleApp with the name and the version.
 long getErrorCount()
          Returns the number of errors that occurred in all Execution Units (XU).
 ObjectName getGreatestRuleAppObjectName(String ruleAppName)
          Returns the RuleApp with the name and the greatest version or null if none.
 ObjectName getRuleAppObjectName(String ruleAppName, String ruleAppVersion)
          Returns a RuleApp with the name and the version or null if none.
 Set<ObjectName> getRuleAppObjectNames()
          Returns all RuleApps.
 Set<ObjectName> getRuleAppObjectNames(String ruleAppName)
          Returns all RuleApps with the specified name.
 long getWarningCount()
          Returns the number of warnings that occurred in all Execution Units (XU).
 Set importRuleApps(byte[] ruleAppArchive, String mergingPolicy, String versioningPolicy)
          Loads a RuleApp archive in the current model.
 boolean removeRuleApp(String ruleAppName, String ruleAppVersion)
          Removes a RuleApp with the name and the version.
 void resetErrorCount()
          Resets the error count for all XU MBeans.
 void resetWarningCount()
          Resets the warning count for all XU MBeans.
 

Field Detail

VALUE_TYPE

static final String VALUE_TYPE
The type used in the objectName of the model MBean.

See Also:
Constant Field Values
Method Detail

getRuleAppObjectNames

Set<ObjectName> getRuleAppObjectNames()
Returns all RuleApps.

Returns:
A set of ObjectNames.

getRuleAppObjectNames

Set<ObjectName> getRuleAppObjectNames(String ruleAppName)
Returns all RuleApps with the specified name.

Parameters:
ruleAppName - The name of the RuleApp.
Returns:
A set of ObjectNames.

getGreatestRuleAppObjectName

ObjectName getGreatestRuleAppObjectName(String ruleAppName)
Returns the RuleApp with the name and the greatest version or null if none.

Since:
JRules 6.0
Parameters:
ruleAppName - The name of the RuleApp.
Returns:
The RuleApp objectname or null.

getRuleAppObjectName

ObjectName getRuleAppObjectName(String ruleAppName,
                                String ruleAppVersion)
Returns a RuleApp with the name and the version or null if none.

Parameters:
ruleAppName - The name of the RuleApp.
ruleAppVersion - The version with the format: "MajorNumber.MinorNumber".
Returns:
The RuleApp objectname or null.

addRuleApp

ObjectName addRuleApp(String ruleAppName,
                      String ruleAppVersion)
                      throws InstanceAlreadyExistsException,
                             InvalidAttributeValueException,
                             OperationsException
Returns a RuleApp with the name and the version.

Throws:
InstanceAlreadyExistsException - If the specified RuleApp already exists.
InvalidAttributeValueException - If an attribute has the wrong format.
OperationsException - If an internal error occurred.
Parameters:
ruleAppName - The name of the RuleApp. Must match the regexp [\p{Alpha}\p{Digit}_]+
ruleAppVersion - The version with the format: "MajorNumber.MinorNumber". MajorNumber must be greater than 0. MinorNumber must be greater or equal to 0.
Returns:
The RuleApp objectName.

removeRuleApp

boolean removeRuleApp(String ruleAppName,
                      String ruleAppVersion)
                      throws OperationsException
Removes a RuleApp with the name and the version.

If parameters do not match an existing RuleApp it returns false, otherwise it returns true.

Throws:
OperationsException - If an internal error occurred.
Parameters:
ruleAppName - The name of the RuleApp.
ruleAppVersion - The version of the RuleApp.
Returns:
true if the specified RuleApp has been removed, otherwise false.

importRuleApps

Set importRuleApps(byte[] ruleAppArchive,
                   String mergingPolicy,
                   String versioningPolicy)
                   throws InvalidAttributeValueException,
                          IOException,
                          OperationsException
Loads a RuleApp archive in the current model.

Arguments mergingPolicy and versioningPolicy are used to resolve name and version conflicts between an existing RuleApp and a new RuleApp in an archive. Possible values are:

Throws:
InvalidAttributeValueException - If an attribute is invalid.
IOException
OperationsException - If the RuleApp archive has the wrong format or an internal error occurred.
Parameters:
ruleAppArchive - A byte array of a Rule Execution Server management model archive contents. Cannot be null.
mergingPolicy - The merging policy.
versioningPolicy - The versioning policy.
Returns:
A set of ObjectNames for RuleApps that have been added to the current model.

getWarningCount

long getWarningCount()
Returns the number of warnings that occurred in all Execution Units (XU). It is the sum of the warnings obtained from all the XU MBeans found.

Returns:
The number of warnings for all XUs.

getErrorCount

long getErrorCount()
Returns the number of errors that occurred in all Execution Units (XU). It is the sum of errors obtained from all the XU MBeans found.

Returns:
The number of errors for all XUs.

resetWarningCount

void resetWarningCount()
Resets the warning count for all XU MBeans.


resetErrorCount

void resetErrorCount()
Resets the error count for all XU MBeans.


Rule Execution Server API

© Copyright IBM Corp. 1987, 2013