Rule Execution Server API

ilog.rules.res.decisionservice.mbean
Interface IlrDecisionServiceMBean


public interface IlrDecisionServiceMBean

Represents a decision service MBean in Rule Execution Server. This MBean allows you to manage decision services (properties, activation), as well as exposing execution statistics.

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 IlrDecisionServiceMBean.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).

Another JMX notification is sent if the decision service has been activated or deactivated (on the call of the method setActivated). The notification type is IlrDecisionServiceMBean.NOTIFICATION_ACTIVATED_CHANGE. The status is retrieved from userData.

Since:
JRules 6.5

Field Summary
static String KEY_AUTHOR
          The key property that can be used to add the author of this decision service.
static String KEY_CREATION_DATE
          The key property that can be used to add the creation date of this decision service.
static String KEY_DESCRIPTION
          The key property that can be used to add the description of this decision service.
static String KEY_VERSION
          The key property that can be used to add the version of this decision service.
static String NOTIFICATION_ACTIVATED_CHANGE
          Notification type if the decision service has been activated or deactivate.
static String NOTIFICATION_PROPERTY_CHANGE
          Notification type if a property is changed.
 
Method Summary
 double getAverageExecutionTime()
          Returns the average time passed in execution for this decision service.
 long getErrorsCount()
          Returns the number of errors for this decision service.
 String getExecutedCanonicalRulesetPath()
          Returns the canonical ruleset path of the ruleset executed.
 long getExecutionCount()
          Returns the number of executions for this decision service.
 long getFirstExecutionDate()
          Returns the date of the first execution of this decision service.
 long getLastErrorDate()
          Returns the date of the last error for this decision service.
 long getLastExecutionDate()
          Returns the date of the last execution of this decision service.
 long getLastExecutionTime()
          Returns the last time passed in execution for this decision service.
 long getMaxExecutionTime()
          Returns the longest time passed in execution for this decision service.
 ObjectName getMBeanObjectName()
          Returns the object name of this MBean.
 long getMinExecutionTime()
          Returns the shortest time passed in execution for this decision service.
 String getName()
          Returns the name of this decision service.
 Properties getProperties()
          Returns a copy of all properties defined on this decision service.
 String getRulesetPath()
          Returns the ruleset path used for the execution.
 long getTotalExecutionTime()
          Returns the total time passed in execution for this decision service.
 boolean isActivated()
          Returns true if the decision service is activated.
 void resetStatistics()
          Reset all statistics.
 void setActivated(boolean activated)
          Sets the status of the decision service.
 void setProperty(String key, String value)
          Sets the value corresponding to a key.
 

Field Detail

NOTIFICATION_PROPERTY_CHANGE

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

See Also:
Constant Field Values

NOTIFICATION_ACTIVATED_CHANGE

static final String NOTIFICATION_ACTIVATED_CHANGE
Notification type if the decision service has been activated or deactivate.

See Also:
Constant Field Values

KEY_AUTHOR

static final String KEY_AUTHOR
The key property that can be used to add the author of this decision service.

See Also:
Constant Field Values

KEY_VERSION

static final String KEY_VERSION
The key property that can be used to add the version of this decision service.

See Also:
Constant Field Values

KEY_CREATION_DATE

static final String KEY_CREATION_DATE
The key property that can be used to add the creation date of this decision service.

See Also:
Constant Field Values

KEY_DESCRIPTION

static final String KEY_DESCRIPTION
The key property that can be used to add the description of this decision service.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the name of this decision service. This name must be unique for all decision service MBeans in the same JMX server.

Returns:
The decision service name.

getRulesetPath

String getRulesetPath()
Returns the ruleset path used for the execution.

Returns:
The ruleset path used for the execution.

getExecutedCanonicalRulesetPath

String getExecutedCanonicalRulesetPath()
Returns the canonical ruleset path of the ruleset executed. This information comes from the call to IlrDecisionServiceMBeanManager.addMeasurement(String, long, long).

Returns:
The canonical ruleset path returned by the last execution.

isActivated

boolean isActivated()
Returns true if the decision service is activated.

Returns:
true if the decision service is activated.

setActivated

void setActivated(boolean activated)
Sets the status of the decision service. This modification is not persistent.

Parameters:
activated - The new status.

getProperties

Properties getProperties()
Returns a copy of all properties defined on this decision service.

Returns:
All properties.

setProperty

void setProperty(String key,
                 String value)
Sets the value corresponding to a key. If the value is null the key will be removed. This modification is not persistent.

Parameters:
key - The property key.
value - The value corresponding to key.

resetStatistics

void resetStatistics()
Reset all statistics.


getExecutionCount

long getExecutionCount()
Returns the number of executions for this decision service.

Returns:
The number of executions.

getErrorsCount

long getErrorsCount()
Returns the number of errors for this decision service.

Returns:
The number of errors.

getLastErrorDate

long getLastErrorDate()
Returns the date of the last error for this decision service.

Returns:
The last error date in ms.

getTotalExecutionTime

long getTotalExecutionTime()
Returns the total time passed in execution for this decision service.

Returns:
The time in ms. -1 if the decision service does not have statistics.

getAverageExecutionTime

double getAverageExecutionTime()
Returns the average time passed in execution for this decision service.

Returns:
The time in ms. -1 if the decision service does not have statistics.

getMaxExecutionTime

long getMaxExecutionTime()
Returns the longest time passed in execution for this decision service.

Returns:
The time in ms. -1 if the decision service does not have statistics.

getMinExecutionTime

long getMinExecutionTime()
Returns the shortest time passed in execution for this decision service.

Returns:
The time in ms. -1 if the decision service does not have statistics.

getLastExecutionTime

long getLastExecutionTime()
Returns the last time passed in execution for this decision service.

Returns:
The time in ms. -1 if the decision service does not have statistics.

getFirstExecutionDate

long getFirstExecutionDate()
Returns the date of the first execution of this decision service.

Returns:
The date in ms. -1 if the decision service has not been executed.

getLastExecutionDate

long getLastExecutionDate()
Returns the date of the last execution of this decision service.

Returns:
The date in ms. -1 if the decision service has not been executed.

getMBeanObjectName

ObjectName getMBeanObjectName()
Returns the object name of this MBean. Can be null if the MBean is not registered.

Since:
JRules 6.6
Returns:
The decision service object name or null if the MBean is not registered.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013