Enum ServiceController.Substate

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CANCELLED
      Cancelled controller installation due to duplicate or other problem.
      DOWN
      Controller is down.
      NEW
      New controller being installed.
      PROBLEM
      Controller cannot start due to a problem with a dependency or transitive dependency.
      REMOVED
      Service has been removed.
      REMOVING
      Service is being removed.
      START_FAILED
      Start failed.
      START_INITIATING
      First phase of start processing.
      START_REQUESTED
      A stopped controller has been requested to start.
      STARTING
      Second phase of start processing (start() method invoked).
      STOP_REQUESTED
      Service is up but has been requested to stop.
      STOPPING
      Service is stopping.
      UP
      Service is up.
      WAITING
      Controller is waiting for an external condition to start, such as a dependent demand.
      WONT_START
      Controller is configured not to start.
    • Method Detail

      • values

        public static ServiceController.Substate[] 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 (ServiceController.Substate c : ServiceController.Substate.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ServiceController.Substate 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
      • isRestState

        public boolean isRestState()
        Determine whether this is a "rest" state.
        Returns:
        true if it is a rest state, false otherwise
      • getState

        public ServiceController.State getState()
        Get the state corresponding to this sub-state.
        Returns:
        the state
      • in

        public boolean in​(ServiceController.Substate... substates)
        Determine if this substate is one of the given substates.
        Parameters:
        substates - the substates to check
        Returns:
        true if this substate is in the set; false otherwise