Subsystem.State
Date: 2016-06-25

org.osgi.service.subsystem

## Enum Subsystem.State

- java.lang.Object
- - java.lang.Enum<Subsystem.State>
  - - org.osgi.service.subsystem.Subsystem.State

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Subsystem.State>
  Enclosing interface:
    Subsystem

      public static enum Subsystem.State
      extends java.lang.Enum<Subsystem.State>

  An enumeration of the possible states of a subsystem.

  These states are a reflection of what constituent resources are permitted to do and not an aggregation of constituent resource states.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ACTIVE` The subsystem is now running.
    `INSTALL_FAILED` The subsystem failed to install.
    `INSTALLED` The subsystem is installed but not yet resolved.
    `INSTALLING` The subsystem is in the process of installing.
    `RESOLVED` The subsystem is resolved and able to be started.
    `RESOLVING` The subsystem is in the process of resolving.
    `STARTING` The subsystem is in the process of starting.
    `STOPPING` The subsystem is in the process of stopping.
    `UNINSTALLED` The subsystem is uninstalled and may not be used.
    `UNINSTALLING` The subsystem is in the process of uninstalling.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Subsystem.State` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Subsystem.State[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INSTALLING

          public static final Subsystem.State INSTALLING

      The subsystem is in the process of installing.

      A subsystem is in the `INSTALLING` state when the `install` method of its parent is active, and attempts are being made to install its content resources. If the install method completes without exception, then the subsystem has successfully installed and must move to the `INSTALLED` state. Otherwise, the subsystem has failed to install and must move to the `INSTALL_FAILED` state.

    - #### INSTALLED

          public static final Subsystem.State INSTALLED

      The subsystem is installed but not yet resolved.

      A subsystem is in the `INSTALLED` state when it has been installed in a parent subsystem but is not or cannot be resolved. This state is visible if the dependencies of the subsystem's content resources cannot be resolved.

    - #### INSTALL_FAILED

          public static final Subsystem.State INSTALL_FAILED

      The subsystem failed to install.

      A subsystem is in the `INSTALL_FAILED` state when an unrecoverable error occurred during installation. The subsystem is in an unusable state but references to the subsystem object may still be available and used for introspection.

    - #### RESOLVING

          public static final Subsystem.State RESOLVING

      The subsystem is in the process of resolving.

      A subsystem is in the `RESOLVING` state when attempts are being made to resolve its content resources. If the resolve process completes without exception, then the subsystem has successfully resolved and must move to the `RESOLVED` state. Otherwise, the subsystem has failed to resolve and must move to the INSTALLED state.

    - #### RESOLVED

          public static final Subsystem.State RESOLVED

      The subsystem is resolved and able to be started.

      A subsystem is in the `RESOLVED` state when all of its content resources are resolved. Note that the subsystem is not active yet.

    - #### STARTING

          public static final Subsystem.State STARTING

      The subsystem is in the process of starting.

      A subsystem is in the `STARTING` state when its `start` method is active, and attempts are being made to start its content and dependencies. If the start method completes without exception, then the subsystem has successfully started and must move to the `ACTIVE` state. Otherwise, the subsystem has failed to start and must move to the `RESOLVED` state.

    - #### ACTIVE

          public static final Subsystem.State ACTIVE

      The subsystem is now running.

      A subsystem is in the `ACTIVE` state when its content and dependencies have been successfully started.

    - #### STOPPING

          public static final Subsystem.State STOPPING

      The subsystem is in the process of stopping.

      A subsystem is in the `STOPPING` state when its `stop` method is active, and attempts are being made to stop its content and dependencies. When the stop method completes, the subsystem is stopped and must move to the `RESOLVED` state.

    - #### UNINSTALLING

          public static final Subsystem.State UNINSTALLING

      The subsystem is in the process of uninstalling.

      A subsystem is in the `UNINSTALLING` state when its `uninstall` method is active, and attempts are being made to uninstall its constituent and dependencies. When the uninstall method completes, the subsystem is uninstalled and must move to the `UNINSTALLED` state.

    - #### UNINSTALLED

          public static final Subsystem.State UNINSTALLED

      The subsystem is uninstalled and may not be used.

      The `UNINSTALLED` state is only visible after a subsystem's constituent and dependencies are uninstalled. The subsystem is in an unusable state but references to the subsystem object may still be available and used for introspection.

  - ### Method Detail

    - #### values

          public static Subsystem.State[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Subsystem.State c : Subsystem.State.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Subsystem.State valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null