ilog.rules.res.decisionservice.mbean

Class IlrDecisionServiceMBeanManager

  • java.lang.Object
    • ilog.rules.res.decisionservice.mbean.IlrDecisionServiceMBeanManager


  • public class IlrDecisionServiceMBeanManager
    extends java.lang.Object
    Manages the decision service MBean (register, unregister, add measurement).
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addError(long timestamp)
      Signals an error for the decision service.
      void addMeasurement(java.lang.String executedCanonicalRulesetPath, long timestamp, long duration)
      Add measurement for the decision service.
      IlrDecisionServiceMBean getMBean()
      Returns the decision service MBean.
      javax.management.ObjectName getObjectName()
      Returns the decision service MBean ObjectName.
      void register(java.lang.String name, java.lang.String rulesetPath, java.util.Properties properties)
      Register the decision service MBean into the local MBean server.
      void unregister()
      Unregister the decision service MBean into the local MBean server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrDecisionServiceMBeanManager

        public IlrDecisionServiceMBeanManager()
        Creates the decision service MBean manager.
      • IlrDecisionServiceMBeanManager

        public IlrDecisionServiceMBeanManager(java.util.Properties jmxProperties)
        Creates the decision service MBean manager.

        Properties are used to retrieve the MBean server (in case of a JNDI lookup for example to override default JNDI properties).

        Parameters:
        jmxProperties - Properties used to retrieve the MBean server.
    • Method Detail

      • register

        public void register(java.lang.String name,
                    java.lang.String rulesetPath,
                    java.util.Properties properties)
                      throws IlrDecisionServiceMBeanException
        Register the decision service MBean into the local MBean server.
        Throws:
        IlrDecisionServiceMBeanException - If an error occurred during the registration of the MBean.
        Parameters:
        name - The decision service name. This name will be integrated in the MBean ObjectName, so it must be unique for the local MBean server. If it is not unique, an IlrDecisionServiceMBeanException will be thrown. There are some restrictions on characters that can be used for this name due to JMX, the name cannot contain any of the characters: comma, equals, colon, quote, asterisk, or question mark.
        rulesetPath - The ruleset path of the ruleset that will be executed by this decision service. This information is used in the console to display the decision service under the right ruleset.
        properties - Properties of the decision service.
      • getObjectName

        public javax.management.ObjectName getObjectName()
        Returns the decision service MBean ObjectName. Returns null if the MBean is not registered.
        Returns:
        The decision service MBean ObjectName or null if the MBean is not registered.
      • getMBean

        public IlrDecisionServiceMBean getMBean()
        Returns the decision service MBean.
        Returns:
        The decision service MBean.
      • addMeasurement

        public void addMeasurement(java.lang.String executedCanonicalRulesetPath,
                          long timestamp,
                          long duration)
        Add measurement for the decision service. This information is used to calculate the statistics in the MBean. When the executedCanonicalRulesetPath is changed, stored statistics are deleted to avoid corruption.
        Parameters:
        executedCanonicalRulesetPath - The canonical ruleset path returned by the execution. Cannot be null.
        timestamp - The timestamp of the execution.
        duration - The execution duration.
      • addError

        public void addError(long timestamp)
        Signals an error for the decision service.
        Parameters:
        timestamp - The timestamp of the error.

© Copyright IBM Corp. 1987, 2020