Enum LifecyclePhase

  • All Implemented Interfaces:
    Serializable, Comparable<LifecyclePhase>

    public enum LifecyclePhase
    extends Enum<LifecyclePhase>
    The lifecycle phase.

    Each service that participates in the life cycle goes through a number of steps to achive a consistent or conformed state. These steps are called lifecycle phases.

    The next lifecycle phases describes a service starting points, in the same order as first mentioned:

    • Linking (Optional)
    • Initialization
    • Checking
    • Storage initialization
    • Resource loading
    • Post resource loading
    And the next phases are for service stop:
    • Before resource unloading
    • Resource unloading
    • Storage closing
    • Disposing
    • Unlinking (Optional)

    Note: The linking phase is performed only if there are no started lifecycle contexts. The unlinking phase is performed only after the last lifecycle context was stopped.

    Since:
    3.0.0
    • Enum Constant Detail

      • LINKING

        public static final LifecyclePhase LINKING
        The services linking phase for soft-linking between services, extension point initialization, etc.
      • INITIALIZATION

        public static final LifecyclePhase INITIALIZATION
        The early-access initialization phase. This phase suits for internal service structures initialization.
      • CHECKING

        public static final LifecyclePhase CHECKING
        The checking phase. Services can check conditions here and report errors.
      • STORAGE_INITIALIZATION

        public static final LifecyclePhase STORAGE_INITIALIZATION
        The storage initialization phase. This phase is for domain model creation.
      • RESOURCE_LOADING

        public static final LifecyclePhase RESOURCE_LOADING
        The resource loading phase. The model is filled here with a loaded resources.
      • POST_RESOURCE_LOADING

        public static final LifecyclePhase POST_RESOURCE_LOADING
        The post resource loading phase. This phase is for subscriptions.
      • BEFORE_RESOURCE_UNLOADING

        public static final LifecyclePhase BEFORE_RESOURCE_UNLOADING
        The before resource unloading phase. This phase is for unsubscribing.
        The phase is opposite to POST_RESOURCE_LOADING.
      • UNLINKING

        public static final LifecyclePhase UNLINKING
        The unlinking phase.
        The phase is opposite to LINKING.
    • Method Detail

      • values

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

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