org.licas.module

## Class LicasModule

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule

- All Implemented Interfaces:
    java.lang.Runnable
  Direct Known Subclasses:
    FrameworkModule

      public class LicasModule
      extends java.lang.Thread

  This is a base class for all of the licas modules and services. It stores very limited functionality related to threading and object loading and any derived modules do not have to be service-related. Thread is extended to make that functionality available to any derived classes.
  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 java.util.ArrayList<java.lang.String>` | `jarFile` A list of jar files required to load in this service.
    `protected java.lang.Object` | `syncOn` To synchronize this service internally on
    `protected java.lang.String` | `uuid` This is the ID of the component

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

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LicasModule()` Creates a new instance of LicasModule.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.ArrayList<java.lang.String>` | `getJarFile()` Get the list of jar files required to load the service.
    `java.lang.String` | `getUUID()` Get the unique service ID.
    `java.lang.Object` | `loadObject(java.util.ArrayList<java.lang.String> theJarUris, java.lang.String theClassName, java.util.ArrayList<java.lang.Object> params)` Create a new instance of the specified object and return.
    `void` | `setJarFile(java.util.ArrayList<java.lang.String> theJarFile)` Set the list of jar files required to load the service, but only if the existing list is null, otherwise it is not changed.
    `void` | `setUUID(java.lang.String thisUUID)` Set the ID value, but only if it is null, otherwise it is not changed.
    `java.lang.String` | `threadAliveState()` Return if the thread is running or not.

    - ### 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`

- - ### Field Detail

    - #### uuid

          protected java.lang.String uuid

      This is the ID of the component

    - #### jarFile

          protected java.util.ArrayList<java.lang.String> jarFile

      A list of jar files required to load in this service. Values are jar file paths of type String.

    - #### syncOn

          protected final java.lang.Object syncOn

      To synchronize this service internally on

  - ### Constructor Detail

    - #### LicasModule

          public LicasModule()

      Creates a new instance of LicasModule.

  - ### Method Detail

    - #### loadObject

          public java.lang.Object loadObject(java.util.ArrayList<java.lang.String> theJarUris,
                                             java.lang.String theClassName,
                                             java.util.ArrayList<java.lang.Object> params)
                                      throws java.lang.Exception

      Create a new instance of the specified object and return. This method also tries to retrieve the object using a remote jar factory.
      Parameters:
        `theJarUris` - uris from which the remote object can be loaded, only if needed.
        `theClassName` - the name of the class.
        `params` - initialisation parameters.
      Returns:
        the loaded object.
      Throws:
        `java.lang.Exception` - any error.

    - #### threadAliveState

          public java.lang.String threadAliveState()

      Return if the thread is running or not.
      Returns:
        true if running (started and not yet died), false otherwise.

    - #### setUUID

          public void setUUID(java.lang.String thisUUID)

      Set the ID value, but only if it is null, otherwise it is not changed. This method should probably not be called manually as the uuid is automatically set when the service is loaded as the service name.
      Parameters:
        `thisUUID` - the ID.

    - #### getUUID

          public java.lang.String getUUID()

      Get the unique service ID.
      Returns:
        the value of uuid.

    - #### setJarFile

          public void setJarFile(java.util.ArrayList<java.lang.String> theJarFile)

      Set the list of jar files required to load the service, but only if the existing list is null, otherwise it is not changed.
      Parameters:
        `theJarFile` - the jar file list. Values are jar paths of type String.

    - #### getJarFile

          public java.util.ArrayList<java.lang.String> getJarFile()

      Get the list of jar files required to load the service.
      Returns:
        the value of jarFile. Values are jar paths of type String.