Rule Execution Server API

ilog.rules.res.model.mbean
Interface IlrJMXRulesetMBean

All Superinterfaces:
IlrJMXEntityMBean

public interface IlrJMXRulesetMBean
extends IlrJMXEntityMBean

IlrJMXRulesetMBean represents a ruleset entity in the Rule Execution Server management model. Use this ruleset entity to manage the ruleset resources used for execution (properties, ruleset archive, canonical ruleset path) and to expose execution statistics.

A JMX notification is sent if a property has changed on an MBean instance, that is, when the setProperty method is called. The notification type is IlrJMXRulesetMBean.NOTIFICATION_PROPERTY_CHANGE. This message contains the property key that has been changed, The new value of the property is retrieved from userData. If this property has been removed, the value is null.

Another JMX notification is sent if a ruleset archive has been changed on an MBean instance when the setRulesetArchive method is called. The notification type is IlrJMXRulesetMBean.NOTIFICATION_RULESET_ARCHIVE_CHANGE.

The following code example shows how to retrieve a deployed ruleset archive:

 public IlrJMXRulesetMBean getRulesetMBean(ObjectName rulesetMBeanName) {
   return (IlrJMXRulesetMBean) Proxy.newProxyInstance(IlrJMXRulesetMBean.class.getClassLoader(), new Class[] { IlrJMXRulesetMBean.class }, createHandler(rulesetMBeanName));
 }
 

See Also:
IlrJMXRepositoryMBean, IlrJMXRuleAppMBean

Field Summary
static String KEY_NAME
          The property key for the ruleset name in the objectName of all ruleset MBeans.
static String KEY_RULEAPP_NAME
          The property key for the RuleApp name in the objectName of all ruleset MBeans.
static String KEY_RULEAPP_VERSION
          The property key for the RuleApp name in the objectName of all ruleset MBeans.
static String KEY_VERSION
          The property key for the ruleset version in the objectName of all ruleset MBeans.
static String NOTIFICATION_PROPERTY_CHANGE
          Notification type if a property is changed.
static String NOTIFICATION_RULESET_ARCHIVE_CHANGE
          Notification type if a ruleset archive is changed.
static String VALUE_TYPE
          The type used in the objectName of all ruleset MBeans.
 
Method Summary
 double getAverageExecuteTaskTime()
          Deprecated.  
 double getAverageExecuteTime()
          Returns the average time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 String getCanonicalRulesetPath()
          Returns the identifier of the ruleset.
 long getExecuteCount()
          Returns the number of "execute" operations in all Execution Units (XU), for this ruleset.
 long getExecuteTaskCount()
          Deprecated.  
 long getFirstExecuteTaskTime()
          Deprecated.  
 long getFirstExecuteTime()
          Returns the date of the first "execute" operation in all Execution Units (XU), for this ruleset.
 long getLastExecuteDuration()
          Returns the time of the last "execute" operation in all Execution Units (XU), for this ruleset.
 long getLastExecuteTaskDuration()
          Deprecated.  
 long getLastExecuteTaskTime()
          Deprecated.  
 long getLastExecuteTime()
          Returns the date of the last "execute" operation in all Execution Units (XU), for this ruleset.
 long getMaxExecuteTaskTime()
          Deprecated.  
 long getMaxExecuteTime()
          Returns the longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 long getMinExecuteTaskTime()
          Deprecated.  
 long getMinExecuteTime()
          Returns the shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 ObjectName getParentRuleAppObjectName()
          Returns the parent RuleApp of this ruleset.
 Properties getProperties()
          Returns all the properties defined on this ruleset.
 String getProperty(String key)
          Returns the property value specified with the key.
 byte[] getRESRulesetArchive()
          Returns the RES ruleset archive JAR stored in a byte array.
 byte[] getRulesetArchive()
          Deprecated. Use getRESRulesetArchive() instead.
 String getStatus()
          Returns the status of the ruleset.
 long getTotalExecuteTaskTime()
          Deprecated.  
 long getTotalExecuteTime()
          Returns the total time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 void resetStatistics()
          Resets all statistics for this ruleset.
 void setProperty(String key, String value)
          Sets the value corresponding to a key.
 void setRESRulesetArchive(String engineType, byte[] content)
          Sets the RES ruleset archive as a stream.
 void setRulesetArchive(byte[] rulesetArchive)
          Deprecated. Use setRESRulesetArchive(String, byte[]) instead.
 void setStatus(String status)
          Sets the status of the ruleset.
 
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 String VALUE_TYPE
The type used in the objectName of all ruleset MBeans.

See Also:
Constant Field Values

KEY_NAME

static final String KEY_NAME
The property key for the ruleset name in the objectName of all ruleset MBeans.

See Also:
Constant Field Values

KEY_VERSION

static final String KEY_VERSION
The property key for the ruleset version in the objectName of all ruleset MBeans.

See Also:
Constant Field Values

KEY_RULEAPP_NAME

static final String KEY_RULEAPP_NAME
The property key for the RuleApp name in the objectName of all ruleset MBeans.

See Also:
Constant Field Values

KEY_RULEAPP_VERSION

static final String KEY_RULEAPP_VERSION
The property key for the RuleApp name in the objectName of all ruleset MBeans.

See Also:
Constant Field Values

NOTIFICATION_PROPERTY_CHANGE

static final String NOTIFICATION_PROPERTY_CHANGE
Notification type if a property is changed.

Since:
JRules 6.0
See Also:
Constant Field Values

NOTIFICATION_RULESET_ARCHIVE_CHANGE

static final String NOTIFICATION_RULESET_ARCHIVE_CHANGE
Notification type if a ruleset archive is changed.

Since:
JRules 6.0
See Also:
Constant Field Values
Method Detail

getParentRuleAppObjectName

ObjectName getParentRuleAppObjectName()
Returns the parent RuleApp of this ruleset.

Returns:
The parent RuleApp objectName.

getCanonicalRulesetPath

String getCanonicalRulesetPath()
Returns the identifier of the ruleset. The format is /RuleAppName/RuleAppVersion/RulesetName/RulesetVersion.

Returns:
The canonical ruleset path.

getStatus

String getStatus()
                 throws OperationsException
Returns the status of the ruleset. This is equivalent to calling getProperties().getProperty("ruleset.status").

Since:
JRules 6.0
Throws:
OperationsException - If a data access error or a concurrent usage occurred.
Returns:
The status.

setStatus

void setStatus(String status)
               throws OperationsException
Sets the status of the ruleset. Equivalent to setProperty("ruleset.status", status).

Since:
JRules 6.0
Throws:
OperationsException - If a data access error or a concurrent usage occurred.
Parameters:
status - The new ruleset status.

getRulesetArchive

byte[] getRulesetArchive()
                         throws OperationsException
Deprecated. Use getRESRulesetArchive() instead.

Returns the ruleset archive JAR stored in a byte array.

Since:
JRules 6.0
Throws:
OperationsException - If data access error occurred.
Returns:
The ruleset archive stored in a byte array.

getRESRulesetArchive

byte[] getRESRulesetArchive()
                            throws OperationsException
Returns the RES ruleset archive JAR stored in a byte array.

Since:
7.5
Throws:
OperationsException - If data access error occurred.
Returns:
The ruleset archive stored in a byte array.

setRulesetArchive

void setRulesetArchive(byte[] rulesetArchive)
                       throws InvalidAttributeValueException,
                              OperationsException
Deprecated. Use setRESRulesetArchive(String, byte[]) instead.

Sets the ruleset archive.

Since:
JRules 6.0
Throws:
InvalidAttributeValueException - if rulesetArchive is null.
OperationsException - if a data access error occurred.
Parameters:
rulesetArchive - The ruleset archive JAR stored in a byte array. Cannot be null.

setRESRulesetArchive

void setRESRulesetArchive(String engineType,
                          byte[] content)
                          throws InvalidAttributeValueException,
                                 OperationsException
Sets the RES ruleset archive as a stream.

Since:
7.5
Throws:
InvalidAttributeValueException
OperationsException
Parameters:
engineType - The type of the engine to be used with this archive: IlrRulesetArchiveProperties.VALUE_ENGINE_TYPE_RCE, IlrRulesetArchiveProperties.VALUE_ENGINE_TYPE_RVE, IlrRulesetArchiveProperties.VALUE_ENGINE_TYPE_RVEND.
content - The content of this archive.

getProperty

String getProperty(String key)
                   throws OperationsException
Returns the property value specified with the key.

Throws:
OperationsException - if a data access error occurred.
Parameters:
key - The property key.
Returns:
The property value.

getProperties

Properties getProperties()
                         throws OperationsException
Returns all the properties defined on this ruleset.

Since:
JRules 6.0
Throws:
OperationsException - if a data access error occurred.
Returns:
The properties defined on this ruleset.

setProperty

void setProperty(String key,
                 String value)
                 throws OperationsException
Sets the value corresponding to a key.

Throws:
OperationsException - if a data access error occurred.
Parameters:
key - The key to be placed into the property list.
value - The value corresponding to key.

getExecuteCount

long getExecuteCount()
Returns the number of "execute" operations in all Execution Units (XU), for this ruleset. This is the sum of counts obtained from all the XU MBeans.

Returns:
The count of the "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getTotalExecuteTime

long getTotalExecuteTime()
Returns the total time passed in the "execute" operation in all Execution Units (XU), for this ruleset. This is the total time obtained from all the XU MBeans.

Returns:
The total time passed in the "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getAverageExecuteTime

double getAverageExecuteTime()
Returns the average time passed in the "execute" operation in all Execution Units (XU), for this ruleset. This is the average time obtained from all the XU MBeans.

Returns:
The average time passed in the "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getMaxExecuteTime

long getMaxExecuteTime()
Returns the longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. This is the longest time obtained from all the XU MBeans.

Returns:
The longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getMinExecuteTime

long getMinExecuteTime()
Returns the shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. This is the shortest time obtained from all the XU MBeans.

Returns:
The shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getFirstExecuteTime

long getFirstExecuteTime()
Returns the date of the first "execute" operation in all Execution Units (XU), for this ruleset. This is the earliest date of all the dates obtained from all the XU MBeans.

Returns:
The date of the first "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getLastExecuteTime

long getLastExecuteTime()
Returns the date of the last "execute" operation in all Execution Units (XU), for this ruleset. This is the last date of all the dates obtained from all the XU MBeans.

Returns:
The date of the last "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getLastExecuteDuration

long getLastExecuteDuration()
Returns the time of the last "execute" operation in all Execution Units (XU), for this ruleset. This is the last time obtained from all the XU MBeans.

Since:
JRules 6.5
Returns:
The time of the last "execute" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getExecuteTaskCount

long getExecuteTaskCount()
Deprecated. 

Returns the count for the "execute task" operation in all Execution Units (XU), for this ruleset. This is the sum of all counts obtained from all the XU MBeans.

Returns:
The count for the "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getTotalExecuteTaskTime

long getTotalExecuteTaskTime()
Deprecated. 

Returns the total time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. This is the total time obtained from all the XU MBeans.

Returns:
The total time for the "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getAverageExecuteTaskTime

double getAverageExecuteTaskTime()
Deprecated. 

Returns the average time in the "execute task" operation in all Execution Units (XU), for this ruleset. This is the average time obtained from all the XU MBeans.

Returns:
The average time for the "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getMaxExecuteTaskTime

long getMaxExecuteTaskTime()
Deprecated. 

Returns the longest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. This is the longest time obtained from all the XU MBeans.

Returns:
The longest time for the "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getMinExecuteTaskTime

long getMinExecuteTaskTime()
Deprecated. 

Returns the shortest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. This is the shortest time obtained from all the XU MBeans.

Returns:
The shortest time for the "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getFirstExecuteTaskTime

long getFirstExecuteTaskTime()
Deprecated. 

Returns the date of the first "execute task" operation in all Execution Units (XU), for this ruleset. This is the earliest date obtained from all the XU MBeans.

Returns:
The date of the first "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getLastExecuteTaskTime

long getLastExecuteTaskTime()
Deprecated. 

Returns the date of the last "execute task" operation in all Execution Units (XU), for this ruleset. It is the last date obtained from all the XU MBeans.

Returns:
The date of the last "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

getLastExecuteTaskDuration

long getLastExecuteTaskDuration()
Deprecated. 

Returns the time of the last "execute task" operation in all Execution Units (XU), for this ruleset. It is the last time obtained from all the XU MBeans.

Since:
JRules 6.5
Returns:
The time of the last "execute task" operation in all Execution Units (XU), for this ruleset. If the ruleset does not have statistics, -1 is returned.

resetStatistics

void resetStatistics()
Resets all statistics for this ruleset.


Rule Execution Server API

© Copyright IBM Corp. 1987, 2013