ilog.rules.res.model.mbean
Interface IlrJMXRuleAppMBean
-
- All Superinterfaces:
- IlrJMXEntityMBean
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 isIlrJMXRuleAppMBean.NOTIFICATION_PROPERTY_CHANGE
. The message contains the property key that has been changed. The new value of the property is retrieved fromuserData
(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)); }
- See Also:
IlrJMXRulesetMBean
,IlrJMXRepositoryMBean
-
-
Field Summary
Fields 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.
-
Method Summary
Methods 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.-
Methods inherited from interface ilog.rules.res.model.mbean.IlrJMXEntityMBean
getCreationDate, getDescription, getDisplayName, getModelObjectName, getName, getRepositoryObjectName, getVersion, setDescription, setDisplayName
-
-
-
-
Field Detail
-
VALUE_TYPE
static final java.lang.String VALUE_TYPE
The type used in the objectName of all RuleApp MBeans.- See Also:
- Constant Field Values
-
KEY_NAME
static final java.lang.String KEY_NAME
The property key for the RuleApp name in the objectName of all RuleApp MBeans.- See Also:
- Constant Field Values
-
KEY_VERSION
static final java.lang.String KEY_VERSION
The property key for the RuleApp version in the objectName of all RuleApp MBeans.- See Also:
- Constant Field Values
-
NOTIFICATION_PROPERTY_CHANGE
static final java.lang.String NOTIFICATION_PROPERTY_CHANGE
Notification type if a property is changed.- Since:
- 6.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRulesetObjectNames
java.util.Set<javax.management.ObjectName> getRulesetObjectNames()
Returns all rulesets in the RuleApp.- Returns:
- A list of
ObjectName
instances.
-
getRulesetObjectNames
java.util.Set<javax.management.ObjectName> getRulesetObjectNames(java.lang.String rulesetName)
Returns all rulesets with a specific name.- Parameters:
rulesetName
- The name of the ruleset.- Returns:
- A set of
ObjectName
instances.
-
getGreatestRulesetObjectName
javax.management.ObjectName getGreatestRulesetObjectName(java.lang.String rulesetName)
Returns the greatest version of a specific ruleset.- Since:
- 6.0
- Parameters:
rulesetName
- The ruleset name.- Returns:
- The ruleset objectname. If
rulesetName
does not exist,null
is returned.
-
getRulesetObjectName
javax.management.ObjectName getRulesetObjectName(java.lang.String rulesetName, java.lang.String rulesetVersion)
Returns a specific ruleset version.- Parameters:
rulesetName
- The ruleset name.rulesetVersion
- The ruleset version.- Returns:
- The ruleset. If this ruleset version does not exist,
null
is returned.
-
addRuleset
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
Adds the specific version of a ruleset.- Throws:
javax.management.InstanceAlreadyExistsException
- if this ruleset already exists.javax.management.InvalidAttributeValueException
- if the parameters are invalid.javax.management.OperationsException
- If an internal error occurred.- Parameters:
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 theIlrEngineType.toString()
method.rulesetArchive
- The ruleset archive to add. This parameter cannot benull
.- Returns:
- The ruleset object name.
-
addRuleset
javax.management.ObjectName addRuleset(java.lang.String rulesetName, java.lang.String rulesetVersion, byte[] rulesetArchive) throws javax.management.InstanceAlreadyExistsException, javax.management.InvalidAttributeValueException, javax.management.OperationsException
Adds the specific version of a ruleset .- Since:
- 6.0
- Throws:
javax.management.InstanceAlreadyExistsException
- if this ruleset already exists.javax.management.InvalidAttributeValueException
- if the parameters are invalid.javax.management.OperationsException
- If an internal error occurred.- Parameters:
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 benull
.- Returns:
- The ruleset object name.
-
removeRuleset
boolean removeRuleset(java.lang.String rulesetName, java.lang.String rulesetVersion) throws javax.management.OperationsException
Removes a the specific version of a ruleset.- Throws:
javax.management.OperationsException
- if an internal error occurred.- Parameters:
rulesetName
- The ruleset name.rulesetVersion
- The version.- Returns:
- If
rulesetVersion
ofrulesetName
has been removed,true
is returned. If this ruleset does not exist,false
is returned.
-
getProperty
java.lang.String getProperty(java.lang.String key) throws javax.management.OperationsException
Returns the property value specified by the key.- Since:
- 6.0
- Throws:
javax.management.OperationsException
- if a data access error occurred.- Parameters:
key
- The property key.- Returns:
- The property value.
-
getProperties
java.util.Properties getProperties() throws javax.management.OperationsException
Returns all properties defined on this RuleApp.- Since:
- 6.0
- Throws:
javax.management.OperationsException
- if a data access error occurred.- Returns:
- All properties.
-
setProperty
void setProperty(java.lang.String key, java.lang.String value) throws javax.management.OperationsException
Sets the value corresponding to a key.- Since:
- 6.0
- Throws:
javax.management.OperationsException
- if a data access error occurred.- Parameters:
key
- The key to be placed into the property list.value
- The value corresponding tokey
.
-
export
byte[] export() throws javax.management.OperationsException
Creates a RuleApp archive.- Throws:
java.io.IOException
- if anIOException
occurs during RuleApp archive creation.javax.management.OperationsException
- if an internal error occurs.- Returns:
- An archive in a byte array.
-
-