com.corticon.analytics

## Class CcAnalyticsHandler

- java.lang.Object
- - com.corticon.analytics.CcAnalyticsHandler

- All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Object>

      public abstract class CcAnalyticsHandler
      extends java.lang.Object
      implements java.util.concurrent.Callable<java.lang.Object>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CcAnalyticsHandler()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `call()`
    `void` | `clear()` ** CcAnalyticHandler will automatically call this method at the end of the processAnalytics() method.
    `void` | `createRuleCatalog(org.json.JSONArray ajsonArrayDecisionServiceRuleCatalog)` ** Corticon Server will set the Rule Catalog Object into this object after execution is completed.
    `java.util.List<CcAnalyticsHandlerMetric>` | `getAssociationChanges()` Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Association.
    `java.util.List<CcAnalyticsHandlerMetric>` | `getAttributeChanges()` Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Attribute.
    `java.lang.String` | `getDecisionServiceName()` Returns the name of the Decision Service.
    `java.util.List<CcAnalyticsHandlerMetric>` | `getEntityChanges()` Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Entity.
    `long` | `getExecutionStartTime()` Returns the start time (in millisecond) from Epoch of when the execution started.
    `long` | `getExecutionTotalTime()` Returns the total time (in millisecond) this execution took to complete.
    `java.lang.Object` | `getInput()` Returns the input request payload object.
    `int` | `getMajorVersionNumber()` Returns the major version of the Decision Service.
    `int` | `getMinorVersionNumber()` Returns the minor version of the Decision Service.
    `java.lang.Object` | `getOutput()` Returns the output response payload object.
    `java.util.List<CcAnalyticsHandlerRuleCatalog>` | `getRuleCatalog()` Returns a List which will contain a set of CcAnalyticsHandlerRuleCatalog objects which represents the superset of Rules associated with this Decision Service.
    `java.util.List<CcAnalyticsHandlerRuleMessage>` | `getRuleMessges()` Returns a List which will contain a set of CcAnalyticsHandlerRuleMessage objects which represents all the Rule Messages that were created during the execution of the Decision Service.
    `abstract void` | `processAnalytics()` The only method that needs to be written by user to process the Analytics in their own way.
    `void` | `setDecisionServiceName(java.lang.String astrValue)` ** Corticon Server will set the name of the Decision Service into this object after execution is completed.
    `void` | `setExecutionStartTime(long alValue)` ** Corticon Server will set the timestamp value (in milliseconds) of when the execution started.
    `void` | `setExecutionTotalTime(long alValue)` ** Corticon Server will set the total time (in milliseconds) that it took for this execution to complete.
    `void` | `setInput(java.lang.Object aobjValue)` ** Corticon Server will set the input request Object into this object after execution is completed.
    `void` | `setMajorVersionNumber(int aiValue)` ** Corticon Server will set the major version of the Decision Service into this object after execution is completed.
    `void` | `setMinorVersionNumber(int aiValue)` ** Corticon Server will set the minor version of the Decision Service into this object after execution is completed.
    `void` | `setOutput(java.lang.Object aobjValue)` ** Corticon Server will set the output response Object into this object after execution is completed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CcAnalyticsHandler

          public CcAnalyticsHandler()

  - ### Method Detail

    - #### getDecisionServiceName

          public final java.lang.String getDecisionServiceName()

      Returns the name of the Decision Service.
      Returns:
        String

    - #### getMajorVersionNumber

          public final int getMajorVersionNumber()

      Returns the major version of the Decision Service.
      Returns:
        int

    - #### getMinorVersionNumber

          public final int getMinorVersionNumber()

      Returns the minor version of the Decision Service.
      Returns:
        int

    - #### setDecisionServiceName

          public final void setDecisionServiceName(java.lang.String astrValue)

      ** Corticon Server will set the name of the Decision Service into this object after execution is completed. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getDecisionServiceName()`

    - #### setMajorVersionNumber

          public final void setMajorVersionNumber(int aiValue)

      ** Corticon Server will set the major version of the Decision Service into this object after execution is completed. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getMajorVersionNumber()`

    - #### setMinorVersionNumber

          public final void setMinorVersionNumber(int aiValue)

      ** Corticon Server will set the minor version of the Decision Service into this object after execution is completed. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getMinorVersionNumber()`

    - #### getInput

          public final java.lang.Object getInput()

      Returns the input request payload object. Depending on the type of execution, this return Object could be a XML Documnet (org.jdom.Document) or a JSONObject (org.json.JSONObject).
      Returns:
        Object

    - #### getOutput

          public final java.lang.Object getOutput()

      Returns the output response payload object. Depending on the type of execution, this return Object could be a XML Documnet (org.jdom.Document) or a JSONObject (org.json.JSONObject).
      Returns:
        Object

    - #### setInput

          public final void setInput(java.lang.Object aobjValue)

      ** Corticon Server will set the input request Object into this object after execution is completed. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getMajorVersionNumber()`

    - #### setOutput

          public final void setOutput(java.lang.Object aobjValue)

      ** Corticon Server will set the output response Object into this object after execution is completed. Custom CcAnalyticsHander does not need to call into this method. This method will automatically parse the response and create object representations of Metrics (com.corticon.analytics.CcAnalyticsHandlerMetric) and Rule Messages (com.corticon.analytics.CcAnalyticsHandlerRuleMessage) based on output response.
      See Also:
        `getEntityChanges()`, `getAttributeChanges()`, `getAssociationChanges()`, `getRuleMessges()`

    - #### getEntityChanges

          public final java.util.List<CcAnalyticsHandlerMetric> getEntityChanges()

      Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Entity. This can include the creation of a new or complete removal of an Entity instance.
      Returns:
        List<

    - #### getAttributeChanges

          public final java.util.List<CcAnalyticsHandlerMetric> getAttributeChanges()

      Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Attribute. This can include a change to an Attirbute value.
      Returns:
        List

    - #### getAssociationChanges

          public final java.util.List<CcAnalyticsHandlerMetric> getAssociationChanges()

      Returns a List which will contain a set of CcAnalyticsHandlerMetric objects with each one representing a recorded changed on an Association. This can include adding or removing an Entity from an Association.
      Returns:
        List

    - #### getRuleMessges

          public final java.util.List<CcAnalyticsHandlerRuleMessage> getRuleMessges()

      Returns a List which will contain a set of CcAnalyticsHandlerRuleMessage objects which represents all the Rule Messages that were created during the execution of the Decision Service.
      Returns:
        List

    - #### getExecutionStartTime

          public final long getExecutionStartTime()

      Returns the start time (in millisecond) from Epoch of when the execution started.
      Returns:
        long

    - #### getExecutionTotalTime

          public final long getExecutionTotalTime()

      Returns the total time (in millisecond) this execution took to complete.
      Returns:
        long

    - #### setExecutionStartTime

          public final void setExecutionStartTime(long alValue)

      ** Corticon Server will set the timestamp value (in milliseconds) of when the execution started. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getExecutionStartTime()`

    - #### setExecutionTotalTime

          public final void setExecutionTotalTime(long alValue)

      ** Corticon Server will set the total time (in milliseconds) that it took for this execution to complete. Custom CcAnalyticsHander does not need to call into this method.
      See Also:
        `getExecutionTotalTime()`

    - #### processAnalytics

          public abstract void processAnalytics()

      The only method that needs to be written by user to process the Analytics in their own way. From within this method, the following data, which is set by the Corticon Server after the execution, can be retrieved from the custom AnalyticHandler by calling into the getter methods on this object.
      See Also:
        `getDecisionServiceName()`, `getMajorVersionNumber()`, `getMinorVersionNumber()`, `getInput()`, `getOutput()`, `getRuleCatalog()`, `getEntityChanges()`, `getAttributeChanges()`, `getAssociationChanges()`, `getExecutionStartTime()`, `getExecutionTotalTime()`

    - #### call

          public final java.lang.Object call()

      Specified by:
        `call` in interface `java.util.concurrent.Callable<java.lang.Object>`

    - #### getRuleCatalog

          public final java.util.List<CcAnalyticsHandlerRuleCatalog> getRuleCatalog()

      Returns a List which will contain a set of CcAnalyticsHandlerRuleCatalog objects which represents the superset of Rules associated with this Decision Service.
      Returns:
        List

    - #### createRuleCatalog

          public final void createRuleCatalog(org.json.JSONArray ajsonArrayDecisionServiceRuleCatalog)

      ** Corticon Server will set the Rule Catalog Object into this object after execution is completed. The superset of all the Rules is stored in the Decision Service, and the Corticon Server will forward the Decision Service's Rule Catalog to this object when the executio is complete and before the CcAnalyticsHandler is fired.
      See Also:
        `#getRuleCatatlog()`

    - #### clear

          public final void clear()

      ** CcAnalyticHandler will automatically call this method at the end of the processAnalytics() method. This will clean up instance variable associated with CcAnalyticsHandler. This includes the input and output Object, Rule Metrics, Rule Messages, and Rule Catalog.

Copyright © 2005-2023 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.