org.licas.module

## Class HeuristicModule

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule
    - - org.licas.module.FrameworkModule
      - - org.licas.module.ServiceModule
        - - org.licas.module.HeuristicModule

- All Implemented Interfaces:
    java.lang.Runnable, ServiceDef
  Direct Known Subclasses:
    HM_Cluster

      public abstract class HeuristicModule
      extends ServiceModule

  Base class for the evaluation heuristics. If the heuristic involves more than 1 evaluation, it can even run off a script.
  Author:
    Kieran Greer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.licas_xml.abs.Element` | `configXml` Admin element with configuration values

    - ### Fields inherited from class org.licas.module.ServiceModule

      `shutDown`

    - ### Fields inherited from class org.licas.module.FrameworkModule

      `passwordHandler, service, serviceType`

    - ### Fields inherited from class org.licas.module.LicasModule

      `jarFile, syncOn, uuid`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeuristicModule()` Create a new instance of HeuristicModule.
    `HeuristicModule(org.licas_xml.abs.Element adminXml)` Create a new instance of HeuristicModule.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract org.licas_xml.abs.Element` | `evaluate(DataQueryModel dataInfo)` Evaluate the behaviour, process, or action.
    `abstract void` | `resetValues()` Reset variables for another test run.

    - ### Methods inherited from class org.licas.module.ServiceModule

      `getShutDown, interrupt, setShutDown, setShutDown`

    - ### Methods inherited from class org.licas.module.FrameworkModule

      `canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType`

    - ### Methods inherited from class org.licas.module.LicasModule

      `getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState`

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

    - ### Methods inherited from interface org.licas.def.ServiceDef

      `getUUID, setJarFile, setUUID`

- - ### Field Detail

    - #### configXml

          protected org.licas_xml.abs.Element configXml

      Admin element with configuration values

  - ### Constructor Detail

    - #### HeuristicModule

          public HeuristicModule()
                          throws java.lang.Exception

      Create a new instance of HeuristicModule.
      Throws:
        `java.lang.Exception` - any error.

    - #### HeuristicModule

          public HeuristicModule(org.licas_xml.abs.Element adminXml)
                          throws java.lang.Exception

      Create a new instance of HeuristicModule.
      Parameters:
        `adminXml` - configuration parameters, including metric type and setup.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### resetValues

          public abstract void resetValues()

      Reset variables for another test run.

    - #### evaluate

          public abstract org.licas_xml.abs.Element evaluate(DataQueryModel dataInfo)
                                                      throws java.lang.Exception

      Evaluate the behaviour, process, or action.
      Parameters:
        `dataInfo` - initialisation dataInfo for the evaluator.
      Returns:
        the evaluation reply. This is XML-based and can be transferred to other services, where the tagged elements define the result meaning. Complex objects can be included but would require a parser.
      Throws:
        `java.lang.Exception` - and error.