de.esprit.appsuite.launch

## Class InitializableObject<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.launch.InitializableObject<C>

- All Implemented Interfaces:
    ApplicationObject<C>, Initializable, SimpleLogSupport, Dumpable
  Direct Known Subclasses:
    AppCacheManager, AsyncInitializableObject

      public abstract class InitializableObject<C extends ApplicationContext>
      extends AbstractApplicationObject<C>
      implements Initializable

  This class maintains an isInitialized flag and provides methods for checking whether initialization has been done yet.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InitializableObject(C ctx)`
    `InitializableObject(C ctx, LogChannel logCh)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkInitialized()` Checks whether initialization has yet been done and throws an `NotInitializedException` if not.
    `abstract void` | `init()` Performs the initialization of this class.
    `boolean` | `isInitialized()` Tells whether initialization has yet been done.
    `protected void` | `setInitialized()`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

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

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

- - ### Constructor Detail

    - #### InitializableObject

          public InitializableObject(C ctx)

    - #### InitializableObject

          public InitializableObject(C ctx,
                             LogChannel logCh)

  - ### Method Detail

    - #### init

          public abstract void init()
                             throws java.lang.Exception

      Description copied from interface: `Initializable`
      Performs the initialization of this class. Note that the implementation should maintain an isInitialized flag which must be set when initialization has completed.
      Specified by:
        `init` in interface `Initializable`
      Throws:
        `java.lang.Exception`

    - #### isInitialized

          public final boolean isInitialized()

      Description copied from interface: `Initializable`
      Tells whether initialization has yet been done.
      Specified by:
        `isInitialized` in interface `Initializable`

    - #### setInitialized

          protected void setInitialized()

    - #### checkInitialized

          public void checkInitialized()

      Description copied from interface: `Initializable`
      Checks whether initialization has yet been done and throws an `NotInitializedException` if not.
      Specified by:
        `checkInitialized` in interface `Initializable`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.