org.licas.module.s_module

## Class SM_Script

- 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

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

      public abstract class SM_Script
      extends SM_Auto

  This class provides functionality for a service to run an autonomic script. The methods are in a separate `CM_Script` 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_Script(Service service, PasswordHandler pHandler)` Creates a new instance of ScriptModule.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract 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.

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

      `evaluateBehaviour, 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_Script

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

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

  - ### Method Detail

    - #### createProcessScript

          public abstract 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.
      Returns:
        a policy script to initialise the service with.
      Throws:
        `java.lang.Exception` - any error.