Enum ServiceLifeCycle

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ServiceLifeCycle>

    public enum ServiceLifeCycle
    extends java.lang.Enum<ServiceLifeCycle>
    The current state of a service.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFINED
      This will only be for a very short time after the creation of a service if the CloudServicePrePrepareEvent in the node isn't cancelled.
      DELETED
      This is the state after STOPPED.
      PREPARED
      This is the state directly after DEFINED or after STOPPED (only if autoDeleteOnStop is disabled for the service).
      RUNNING
      This is the state after PREPARED.
      STOPPED
      This is the state after RUNNING.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ServiceLifeCycle valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ServiceLifeCycle[] 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

      • DEFINED

        public static final ServiceLifeCycle DEFINED
        This will only be for a very short time after the creation of a service if the CloudServicePrePrepareEvent in the node isn't cancelled. After that event has been called, CloudNet will only copy the SSL certificates if necessary and directly switch to the PREPARED state after it.
      • PREPARED

        public static final ServiceLifeCycle PREPARED
        This is the state directly after DEFINED or after STOPPED (only if autoDeleteOnStop is disabled for the service). It will be prepared until it is changed to RUNNING by SpecificCloudServiceProvider.start().
      • STOPPED

        public static final ServiceLifeCycle STOPPED
        This is the state after RUNNING. It is invoked by exiting the process. This will only be for a very short time after the process has exited. There are two possibilities for the next state: - If autoDeleteOnStop is enabled, the state will be switched to DELETED. - If autoDeleteOnStop is disabled, the state will be switched to PREPARED.
    • Method Detail

      • values

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

        public static ServiceLifeCycle 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