public interface IlrJMXRuleAppMBean extends IlrJMXEntityMBean
IlrJMXRuleAppMBean represents a RuleApp entity in the Rule
Execution Server management model.
Use the RuleApp entity to create, list, and remove rulesets, as well
as manage properties. It can also be used to create RuleApp
archives.
A JMX notification is sent if a property is changed on an MBean instance (on
the call of the method setProperty). The notification type is
IlrJMXRuleAppMBean.NOTIFICATION_PROPERTY_CHANGE. The message
contains the property key that has been changed. The new value of the
property is retrieved from userData (null if
the property has been removed).
For example to retrieve a deployed RuleApp:
public IlrJMXRuleAppMBean getRuleAppMBean(ObjectName ruleappMBeanName) {
return (IlrJMXRuleAppMBean) Proxy.newProxyInstance(IlrJMXRuleAppMBean.class.getClassLoader(),
new Class[] { IlrJMXRuleAppMBean.class }, createHandler(ruleappMBeanName));
}
IlrJMXRulesetMBean,
IlrJMXRepositoryMBean| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_NAME
The property key for the RuleApp name in the objectName of all RuleApp
MBeans.
|
static java.lang.String |
KEY_VERSION
The property key for the RuleApp version in the objectName of all RuleApp
MBeans.
|
static java.lang.String |
NOTIFICATION_PROPERTY_CHANGE
Notification type if a property is changed.
|
static java.lang.String |
VALUE_TYPE
The type used in the objectName of all RuleApp MBeans.
|
| Modifier and Type | Method and Description |
|---|---|
javax.management.ObjectName |
addRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion,
byte[] rulesetArchive)
Adds the specific version of a ruleset .
|
javax.management.ObjectName |
addRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion,
java.lang.String engineType,
byte[] rulesetArchive)
Adds the specific version of a ruleset.
|
byte[] |
export()
Creates a RuleApp archive.
|
javax.management.ObjectName |
getGreatestRulesetObjectName(java.lang.String rulesetName)
Returns the greatest version of a specific ruleset.
|
java.util.Properties |
getProperties()
Returns all properties defined on this RuleApp.
|
java.lang.String |
getProperty(java.lang.String key)
Returns the property value specified by the key.
|
javax.management.ObjectName |
getRulesetObjectName(java.lang.String rulesetName,
java.lang.String rulesetVersion)
Returns a specific ruleset version.
|
java.util.Set<javax.management.ObjectName> |
getRulesetObjectNames()
Returns all rulesets in the RuleApp.
|
java.util.Set<javax.management.ObjectName> |
getRulesetObjectNames(java.lang.String rulesetName)
Returns all rulesets with a specific name.
|
boolean |
removeRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion)
Removes a the specific version of a ruleset.
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value corresponding to a key.
|
getCreationDate, getDescription, getDisplayName, getModelObjectName, getName, getRepositoryObjectName, getVersion, setDescription, setDisplayNamestatic final java.lang.String VALUE_TYPE
static final java.lang.String KEY_NAME
static final java.lang.String KEY_VERSION
static final java.lang.String NOTIFICATION_PROPERTY_CHANGE
java.util.Set<javax.management.ObjectName> getRulesetObjectNames()
ObjectName instances.java.util.Set<javax.management.ObjectName> getRulesetObjectNames(java.lang.String rulesetName)
rulesetName - The name of the ruleset.ObjectName instances.javax.management.ObjectName getGreatestRulesetObjectName(java.lang.String rulesetName)
rulesetName - The ruleset name.rulesetName does not exist,
null is returned.javax.management.ObjectName getRulesetObjectName(java.lang.String rulesetName,
java.lang.String rulesetVersion)
rulesetName - The ruleset name.rulesetVersion - The ruleset version.null is returned.javax.management.ObjectName addRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion,
java.lang.String engineType,
byte[] rulesetArchive)
throws javax.management.InstanceAlreadyExistsException,
javax.management.InvalidAttributeValueException,
javax.management.OperationsException
javax.management.InstanceAlreadyExistsException - if this ruleset already exists.javax.management.InvalidAttributeValueException - if the parameters are invalid.javax.management.OperationsException - If an internal error occurred.rulesetName - The name of the ruleset. Must match the following regular expression
[\p{Alpha}\p{Digit}_]+.
(rulesetVersion - The version in the format: "MajorNumber.MinorNumber". MajorNumber must be greater than 0. MinorNumber
must be greater or equal to 0.engineType - The engine type, either the classic rule
engine or the decision engine. To get the values,
call the IlrEngineType.toString()
method.rulesetArchive - The ruleset archive to add. This parameter cannot be null.javax.management.ObjectName addRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion,
byte[] rulesetArchive)
throws javax.management.InstanceAlreadyExistsException,
javax.management.InvalidAttributeValueException,
javax.management.OperationsException
javax.management.InstanceAlreadyExistsException - if this ruleset already exists.javax.management.InvalidAttributeValueException - if the parameters are invalid.javax.management.OperationsException - If an internal error occurred.rulesetName - The name of the ruleset. Must match the following regular
expression [\p{Alpha}\p{Digit}_]+.rulesetVersion - The version in the format: "MajorNumber.MinorNumber".
MajorNumber must be greater than 0. MinorNumber must be
greater or equal to 0.rulesetArchive - The ruleset archive to add. This parameter cannot be
null.boolean removeRuleset(java.lang.String rulesetName,
java.lang.String rulesetVersion)
throws javax.management.OperationsException
javax.management.OperationsException - if an internal error occurred.rulesetName - The ruleset name.rulesetVersion - The version.rulesetVersion of
rulesetName has been removed, true is returned.
If this ruleset does not exist, false is returned.java.lang.String getProperty(java.lang.String key)
throws javax.management.OperationsException
javax.management.OperationsException - if a data access error occurred.key - The property key.java.util.Properties getProperties()
throws javax.management.OperationsException
javax.management.OperationsException - if a data access error occurred.void setProperty(java.lang.String key,
java.lang.String value)
throws javax.management.OperationsException
javax.management.OperationsException - if a data access error occurred.key - The key to be placed into the property list.value - The value corresponding to key.byte[] export()
throws javax.management.OperationsException
java.io.IOException - if an IOException occurs during RuleApp
archive creation.javax.management.OperationsException - if an internal error occurs.© Copyright IBM Corp. 1987, 2017