org.qi4j.api.activation

## Class ApplicationPassivationThread

- java.lang.Object
- - java.lang.Thread
  - - org.qi4j.api.activation.ApplicationPassivationThread

- All Implemented Interfaces:
    Runnable

      public final class ApplicationPassivationThread
      extends Thread

  Application Passivation Thread to use as a Shutdown Hook.

      Runtime.getRuntime().addShutdownHook( new ApplicationPassivationThread( application ) );

  Constructors to control where errors are logged are provided. They support PrintStream (STDOUT/STDERR) and SLF4J Loggers. Defaults to STDERR.

- - ### Nested Class Summary

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

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

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

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationPassivationThread(Application application)` Create a new Application Passivation Thread that output errors to STDERR.
    `ApplicationPassivationThread(Application application, Logger logger)` Create a new Application Passivation Thread that output errors to a Logger.
    `ApplicationPassivationThread(Application application, PrintStream output)` Create a new Application Passivation Thread that output errors to a PrintStream.

  - ### Method Summary

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

- - ### Constructor Detail

    - #### ApplicationPassivationThread

          public ApplicationPassivationThread(Application application)

      Create a new Application Passivation Thread that output errors to STDERR.
      Parameters:
        `application` - The Application to passivate

    - #### ApplicationPassivationThread

          public ApplicationPassivationThread(Application application,
                                      Logger logger)

      Create a new Application Passivation Thread that output errors to a Logger.
      Parameters:
        `application` - The Application to passivate
        `logger` - Logger for errors

    - #### ApplicationPassivationThread

          public ApplicationPassivationThread(Application application,
                                      PrintStream output)

      Create a new Application Passivation Thread that output errors to a PrintStream.
      Parameters:
        `application` - The Application to passivate
        `output` - PrintStream for errors