ILOG JRules

ilog.rules.bres.model.mbean.util
Class IlrJmxMutableRuleset

java.lang.Object
  extended by ilog.rules.bres.model.mbean.util.IlrJmxMutableEntity
      extended by ilog.rules.bres.model.mbean.util.IlrJmxMutableRuleset
All Implemented Interfaces:
IlrJmxEntityMBean, IlrJmxRulesetMBean

public class IlrJmxMutableRuleset
extends IlrJmxMutableEntity
implements IlrJmxRulesetMBean

Provides a wrapper for ruleset MBeans. Allows access to local ruleset MBeans as well as through a J2EE cluster (retrieve automatically Ruleset MBeans in the cluster). Cannot be used outside the application server.

Provides a default implementation based on JMX 1.0 for local MBean access and a specific implementation for BEA WebLogic, IBM WebSphere, JBoss, and Oracle clusters.


Field Summary
 
Fields inherited from interface ilog.rules.bres.model.mbean.IlrJmxRulesetMBean
KEY_NAME, KEY_RULEAPP_NAME, KEY_RULEAPP_VERSION, KEY_VERSION, NOTIFICATION_PROPERTY_CHANGE, NOTIFICATION_RULESET_ARCHIVE_CHANGE, VALUE_TYPE
 
Method Summary
 double getAverageExecuteTaskTime()
          Returns the average time in the "execute task" operation in all Execution Units (XU), for this ruleset.
 double getAverageExecuteTime()
          Returns the average time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 String getCanonicalRulesetPath()
          Returns the canonical ruleset path of this ruleset.
 long getExecuteCount()
          Returns a count of the "execute" operation in all Execution Units (XU), for this ruleset.
 long getExecuteTaskCount()
          Returns the count for the "execute task" operation in all Execution Units (XU), for this ruleset.
 long getFirstExecuteTaskTime()
          Returns the date of the first "execute task" operation in all Execution Units (XU), for this ruleset.
 long getFirstExecuteTime()
          Returns the date of the first "execute" operation in all Execution Units (XU), for this ruleset.
 String getIRL()
          Deprecated. As of JRules 6.0, replaced by getRulesetArchive().
 long getLastExecuteDuration()
          Returns the time of the last "execute" operation in all Execution Units (XU), for this ruleset.
 long getLastExecuteTaskDuration()
          Returns the time of the last "execute task" operation in all Execution Units (XU), for this ruleset.
 long getLastExecuteTaskTime()
          Returns the date of the last "execute task" operation in all Execution Units (XU), for this ruleset.
 long getLastExecuteTime()
          Returns the date of the last "execute" operation in all Execution Units (XU), for this ruleset.
 long getMaxExecuteTaskTime()
          Returns the longest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset.
 long getMaxExecuteTime()
          Returns the longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 long getMinExecuteTaskTime()
          Returns the shortest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset.
 long getMinExecuteTime()
          Returns the shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 ObjectName getObjectName()
          Returns the objectName of this ruleset MBean.
 ObjectName getParentRuleAppObjectName()
          Returns the parent RuleApp ObjectName of this ruleset
 Properties getProperties()
          Returns all ruleset properties.
 String getProperty(String key)
          Sets the property with the specified key.
 byte[] getRulesetArchive()
          Returns the ruleset archive of this ruleset.
 String getStatus()
          Returns the status of the ruleset.
 long getTotalExecuteTaskTime()
          Returns the total time passed in the "execute task" operation in all Execution Units (XU), for this ruleset.
 long getTotalExecuteTime()
          Returns the total time passed in the "execute" operation in all Execution Units (XU), for this ruleset.
 String getXOM()
          Deprecated. As of JRules 6.0, replaced by getRulesetArchive().
 void resetStatistics()
          Resets all statistics for this ruleset.
 void setIRL(String irl)
          Deprecated. As of JRules 6.0, replaced by setRulesetArchive(byte[]).
 void setProperty(String key, String value)
          Sets the value of a property.
 void setRulesetArchive(byte[] rulesetArchive)
          Sets the ruleset archive of this ruleset.
 void setStatus(String status)
          Sets the status of the ruleset.
 void setXOM(String xom)
          Deprecated. As of JRules 6.0, replaced by setRulesetArchive(byte[]).
 
Methods inherited from class ilog.rules.bres.model.mbean.util.IlrJmxMutableEntity
getCreationDate, getDescription, getDisplayName, getModelObjectName, getName, getVersion, setDescription, setDisplayName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.rules.bres.model.mbean.IlrJmxEntityMBean
getCreationDate, getDescription, getDisplayName, getModelObjectName, getName, getVersion, setDescription, setDisplayName
 

Method Detail

getObjectName

public ObjectName getObjectName()
Returns the objectName of this ruleset MBean.

Returns:
The ruleset objectName.

getCanonicalRulesetPath

public String getCanonicalRulesetPath()
                               throws IllegalStateException
Returns the canonical ruleset path of this ruleset.

Specified by:
getCanonicalRulesetPath in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The canonical ruleset path.
See Also:
IlrJmxRulesetMBean.getCanonicalRulesetPath()

getStatus

public String getStatus()
                 throws OperationsException,
                        IllegalStateException
Returns the status of the ruleset. Equivalent to getProperties().getProperty("ruleset.status").

Specified by:
getStatus in interface IlrJmxRulesetMBean
Throws:
OperationsException - If a data access error or a concurrent usage occurred.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.0
Returns:
The status.
See Also:
IlrJmxRulesetMBean.getStatus()

setStatus

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

Specified by:
setStatus in interface IlrJmxRulesetMBean
Throws:
OperationsException - If a data access error or a concurrent usage occurred.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.0
Parameters:
status - The new ruleset status.
See Also:
IlrJmxRulesetMBean.setStatus(String)

getXOM

public String getXOM()
              throws OperationsException,
                     IllegalStateException
Deprecated. As of JRules 6.0, replaced by getRulesetArchive().

Returns the dynamic XML XOM of this ruleset. Works only if the ruleset has been created with the deprecated API IlrJmxRuleAppMBean.addRuleset(String, String, String), otherwise an UnsupportedOperationException is thrown.

Specified by:
getXOM in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
UnsupportedOperationException - If the ruleset has not been created with IlrJmxRuleAppMBean.addRuleset(String, String, String).
Returns:
The dynamic XML XOM, or null if the ruleset does not have a dynamic XML XOM.
See Also:
IlrJmxRulesetMBean.getXOM()

setXOM

public void setXOM(String xom)
            throws OperationsException,
                   IllegalStateException
Deprecated. As of JRules 6.0, replaced by setRulesetArchive(byte[]).

Modifies the dynamic XML XOM of this ruleset. Works only if the ruleset has been created with the deprecated API IlrJmxRuleAppMBean.addRuleset(String, String, String), otherwise an UnsupportedOperationException is thrown.

Specified by:
setXOM in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
UnsupportedOperationException - If the ruleset has not been created with IlrJmxRuleAppMBean.addRuleset(String, String, String).
Parameters:
xom - The new dynamic XML XOM.
See Also:
IlrJmxRulesetMBean.setXOM(String)

getIRL

public String getIRL()
              throws OperationsException,
                     IllegalStateException
Deprecated. As of JRules 6.0, replaced by getRulesetArchive().

Returns the IRL of this ruleset. The returned value cannot be null because a ruleset cannot have an empty IRL. Works only if the ruleset has been created with the deprecated API IlrJmxRuleAppMBean.addRuleset(String, String, String), otherwise an UnsupportedOperationException is thrown.

Specified by:
getIRL in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
UnsupportedOperationException - If the ruleset has not been created with IlrJmxRuleAppMBean.addRuleset(String, String, String).
Returns:
The ruleset. Cannot be null.
See Also:
IlrJmxRulesetMBean.getIRL()

setIRL

public void setIRL(String irl)
            throws IllegalStateException,
                   InvalidAttributeValueException,
                   OperationsException
Deprecated. As of JRules 6.0, replaced by setRulesetArchive(byte[]).

Modifies the IRL of this ruleset. The parameter cannot be null. Works only if the ruleset has been created with the deprecated API IlrJmxRuleAppMBean.addRuleset(String, String, String), otherwise an UnsupportedOperationException is thrown.

Specified by:
setIRL in interface IlrJmxRulesetMBean
Throws:
InvalidAttributeValueException - If the parameter irl is null.
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
UnsupportedOperationException - If the ruleset has not been created with IlrJmxRuleAppMBean.addRuleset(String, String, String).
Parameters:
irl - The new ruleset, cannot be null.
See Also:
IlrJmxRulesetMBean.setIRL(String)

getRulesetArchive

public byte[] getRulesetArchive()
                         throws OperationsException,
                                IllegalStateException
Returns the ruleset archive of this ruleset. The returned value cannot be null because a ruleset cannot have an empty ruleset archive.

Specified by:
getRulesetArchive in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.0
Returns:
The ruleset archive. Cannot be null.
See Also:
IlrJmxRulesetMBean.getRulesetArchive()

setRulesetArchive

public void setRulesetArchive(byte[] rulesetArchive)
                       throws IllegalStateException,
                              InvalidAttributeValueException,
                              OperationsException
Sets the ruleset archive of this ruleset. The parameter cannot be null.

Specified by:
setRulesetArchive in interface IlrJmxRulesetMBean
Throws:
InvalidAttributeValueException - If the parameter rulesetArchive is null.
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.0
Parameters:
rulesetArchive - The new ruleset archive, cannot be null.
See Also:
IlrJmxRulesetMBean.setRulesetArchive(byte[])

getProperty

public String getProperty(String key)
                   throws OperationsException,
                          IllegalStateException
Sets the property with the specified key. If the key is not found in this property list, the default property list and its defaults are then checked recursively. The method returns null if the property is not found.

Specified by:
getProperty in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Parameters:
key - The property key. Cannot be null.
Returns:
The value linked to the key.
See Also:
IlrJmxRulesetMBean.getProperty(String)

getProperties

public Properties getProperties()
                         throws OperationsException,
                                IllegalStateException
Returns all ruleset properties.

Specified by:
getProperties in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.0
Returns:
All properties.
See Also:
IlrJmxRulesetMBean.getProperties()

setProperty

public void setProperty(String key,
                        String value)
                 throws OperationsException,
                        IllegalStateException
Sets the value of a property.

Specified by:
setProperty in interface IlrJmxRulesetMBean
Throws:
OperationsException - If an error occurred in the MBean.
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Parameters:
key - The property key.
value - The new value.
See Also:
IlrJmxRulesetMBean.setProperty(String, String)

getParentRuleAppObjectName

public ObjectName getParentRuleAppObjectName()
                                      throws IllegalStateException
Returns the parent RuleApp ObjectName of this ruleset

Specified by:
getParentRuleAppObjectName in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The parent RuleApp ObjectName.
See Also:
IlrJmxRulesetMBean.getParentRuleAppObjectName()

getExecuteCount

public long getExecuteCount()
                     throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns a count of the "execute" operation in all Execution Units (XU), for this ruleset. It is the sum of counts obtained from all the XU MBeans.

Specified by:
getExecuteCount in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The count of the "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getExecuteCount()

getTotalExecuteTime

public long getTotalExecuteTime()
                         throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the total time passed in the "execute" operation in all Execution Units (XU), for this ruleset. It is the total time obtained from all the XU MBeans.

Specified by:
getTotalExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The total time passed in the "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getTotalExecuteTime()

getAverageExecuteTime

public double getAverageExecuteTime()
                             throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the average time passed in the "execute" operation in all Execution Units (XU), for this ruleset. It is the average time obtained from all the XU MBeans.

Specified by:
getAverageExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The average time passed in the "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getAverageExecuteTime()

getMaxExecuteTime

public long getMaxExecuteTime()
                       throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. It is the longest time obtained from all the XU MBeans.

Specified by:
getMaxExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The longest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getMaxExecuteTime()

getMinExecuteTime

public long getMinExecuteTime()
                       throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. It is the shortest time obtained from all the XU MBeans.

Specified by:
getMinExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The shortest time passed in the "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getMinExecuteTime()

getFirstExecuteTime

public long getFirstExecuteTime()
                         throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the date of the first "execute" operation in all Execution Units (XU), for this ruleset. It is the earliest date of all the dates obtained from all the XU MBeans.

Specified by:
getFirstExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The date of the first "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getFirstExecuteTime()

getLastExecuteTime

public long getLastExecuteTime()
                        throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the date of the last "execute" operation in all Execution Units (XU), for this ruleset. It is the last date of all the dates obtained from all the XU MBeans.

Specified by:
getLastExecuteTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The date of the last "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getLastExecuteTime()

getLastExecuteDuration

public long getLastExecuteDuration()
                            throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the time of the last "execute" operation in all Execution Units (XU), for this ruleset. It is the last time obtained from all the XU MBeans.

Specified by:
getLastExecuteDuration in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.5
Returns:
The time of the last "execute" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getLastExecuteDuration()

getExecuteTaskCount

public long getExecuteTaskCount()
                         throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the count for the "execute task" operation in all Execution Units (XU), for this ruleset. It is the sum of counts obtained from all the XU MBeans.

Specified by:
getExecuteTaskCount in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The count for the "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getExecuteTaskCount()

getTotalExecuteTaskTime

public long getTotalExecuteTaskTime()
                             throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the total time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. It is the total time obtained from all the XU MBeans.

Specified by:
getTotalExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The total time for the "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getTotalExecuteTaskTime()

getAverageExecuteTaskTime

public double getAverageExecuteTaskTime()
                                 throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the average time in the "execute task" operation in all Execution Units (XU), for this ruleset. It is the average time obtained from all the XU MBeans.

Specified by:
getAverageExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The average time for the "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getAverageExecuteTaskTime()

getMaxExecuteTaskTime

public long getMaxExecuteTaskTime()
                           throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the longest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. It is the longest time obtained from all the XU MBeans.

Specified by:
getMaxExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The longest time for the "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getMaxExecuteTaskTime()

getMinExecuteTaskTime

public long getMinExecuteTaskTime()
                           throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the shortest time passed in the "execute task" operation in all Execution Units (XU), for this ruleset. It is the shortest time obtained from all the XU MBeans.

Specified by:
getMinExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The shortest time for the "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getMinExecuteTaskTime()

getFirstExecuteTaskTime

public long getFirstExecuteTaskTime()
                             throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Returns the date of the first "execute task" operation in all Execution Units (XU), for this ruleset. It is the earliest date obtained from all the XU MBeans.

Specified by:
getFirstExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The date of the first "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getFirstExecuteTaskTime()

getLastExecuteTaskTime

public long getLastExecuteTaskTime()
                            throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
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.

Specified by:
getLastExecuteTaskTime in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Returns:
The date of the last "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getLastExecuteTaskTime()

getLastExecuteTaskDuration

public long getLastExecuteTaskDuration()
                                throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
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.

Specified by:
getLastExecuteTaskDuration in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
Since:
JRules 6.5
Returns:
The time of the last "execute task" operation in all Execution Units (XU), for this ruleset. -1 if the ruleset does not have statistics.
See Also:
IlrJmxRulesetMBean.getLastExecuteTaskDuration()

resetStatistics

public void resetStatistics()
                     throws IllegalStateException
Description copied from interface: IlrJmxRulesetMBean
Resets all statistics for this ruleset.

Specified by:
resetStatistics in interface IlrJmxRulesetMBean
Throws:
IllegalStateException - If the MBean server is unavailable or an internal error occurred with the MBean server.
See Also:
IlrJmxRulesetMBean.resetStatistics()

ILOG JRules