org.licas.module.s_module

## Class SM_LinkData

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule
    - - org.licas.module.FrameworkModule
      - - org.licas.module.s_module.SM_Service
        - - org.licas.module.s_module.SM_Data
          - - org.licas.module.s_module.SM_Auto
            - - org.licas.module.s_module.SM_Script
              - - org.licas.module.s_module.SM_LinkData

- All Implemented Interfaces:
    java.lang.Runnable, ServiceDef

      public class SM_LinkData
      extends SM_Script

  This class provides functionality for a scientific service to store and process data in an autonomic loop. The methods are in a separate `CM_LinkData` class.
  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 inherited from class org.licas.module.s_module.SM_Data

      `dataQueue`

    - ### Fields inherited from class org.licas.module.s_module.SM_Service

      `cm, commID`

    - ### 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
    `SM_LinkData(Service service, PasswordHandler pHandler)` Creates a new instance of LinkDataModule.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.licas_xml.abs.Element` | `createProcessScript()` Create the policy description that can be used as a default script for initialising the auto engine of this service.
    `MessageInfo` | `evaluateBehaviour(MessageInfo messageInfo)` EvaluateBase a behaviour `messageInfo` using the `evaluate` service and invoke a resulting action, by calling `behaviourAction`.

    - ### Methods inherited from class org.licas.module.s_module.SM_Auto

      `evaluateBehaviour, getAutoEngine, invokeBehaviour, setAutonomicManager`

    - ### Methods inherited from class org.licas.module.s_module.SM_Data

      `dataFromService, dataToService, getAllData, getDataQueue, getDataRandomID, getServiceIDs, resetValues, setAllData`

    - ### Methods inherited from class org.licas.module.s_module.SM_Service

      `getCommID, getServerPassword, setCommID, setControlModule, setDataModule`

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

      `canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, 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`

- - ### Constructor Detail

    - #### SM_LinkData

          public SM_LinkData(Service service,
                             PasswordHandler pHandler)
                      throws java.lang.Exception

      Creates a new instance of LinkDataModule.
      Parameters:
        `service` - the parent service.
        `pHandler` - the parent password handler.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### evaluateBehaviour

          public MessageInfo evaluateBehaviour(MessageInfo messageInfo)
                                        throws ServiceException,
                                               java.lang.Exception

      EvaluateBase a behaviour `messageInfo` using the `evaluate` service and invoke a resulting action, by calling `behaviourAction`.
      Overrides:
        `evaluateBehaviour` in class `SM_Auto`
      Parameters:
        `messageInfo` - the message with data to process. It is not used in this implementation, where the data values are retrieved by requests to each service instead.
      Returns:
        the evaluation reply.
      Throws:
        `ServiceException` - probably for password or service not found.
        `java.lang.Exception` - and error.

    - #### createProcessScript

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

      Create the policy description that can be used as a default script for initialising the auto engine of this service. This if for the service itself, not any related autonomic manager.
      Specified by:
        `createProcessScript` in class `SM_Script`
      Returns:
        a policy script to initialise the service with.
      Throws:
        `java.lang.Exception` - any error.