Enum ServiceController.State

    • Enum Constant Detail

      • STARTING

        public static final ServiceController.State STARTING
        Service is starting. Dependencies may not enter the DOWN state. This state may not be left until the start method has finished or failed.
      • START_FAILED

        public static final ServiceController.State START_FAILED
        Start failed, or was cancelled. From this state, the start may be retried or the service may enter the DOWN state.
      • STOPPING

        public static final ServiceController.State STOPPING
        Service is stopping. Dependents may not enter the STARTING state. This state may not be left until all dependents are DOWN and the stop method has finished.
    • Method Detail

      • values

        public static ServiceController.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 (ServiceController.State c : ServiceController.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 ServiceController.State valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • in

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