Enum Class Lifecycle.Phase

java.lang.Object
java.lang.Enum<Lifecycle.Phase>
com.tnsai.annotations.Lifecycle.Phase
All Implemented Interfaces:
Serializable, Comparable<Lifecycle.Phase>, Constable
Enclosing class:
Lifecycle

public static enum Lifecycle.Phase extends Enum<Lifecycle.Phase>
Agent lifecycle phases.
  • Enum Constant Details

    • INIT

      public static final Lifecycle.Phase INIT
      Agent instantiation and configuration.

      Called once when agent is created.

    • START

      public static final Lifecycle.Phase START
      Agent activation.

      Called when agent starts processing.

    • PAUSE

      public static final Lifecycle.Phase PAUSE
      Temporary suspension.

      Called when agent is paused.

    • RESUME

      public static final Lifecycle.Phase RESUME
      Resume from suspension.

      Called when agent resumes from pause.

    • STOP

      public static final Lifecycle.Phase STOP
      Normal shutdown.

      Called when agent is stopped gracefully.

    • DESTROY

      public static final Lifecycle.Phase DESTROY
      Final cleanup.

      Called before agent is destroyed.

    • ERROR

      public static final Lifecycle.Phase ERROR
      Error handling.

      Called when an unhandled error occurs.

      Method should accept Throwable parameter.

    • BEFORE_TASK

      public static final Lifecycle.Phase BEFORE_TASK
      Before each task execution.

      Called before processing each task.

    • AFTER_TASK

      public static final Lifecycle.Phase AFTER_TASK
      After each task execution.

      Called after processing each task.

    • HEARTBEAT

      public static final Lifecycle.Phase HEARTBEAT
      Periodic heartbeat.

      Called periodically for health checks.

  • Method Details

    • values

      public static Lifecycle.Phase[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Lifecycle.Phase valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null