Package com.tnsai.annotations
Enum Class Lifecycle.Phase
- All Implemented Interfaces:
Serializable,Comparable<Lifecycle.Phase>,Constable
- Enclosing class:
Lifecycle
Agent lifecycle phases.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAfter each task execution.Before each task execution.Final cleanup.Error handling.Periodic heartbeat.Agent instantiation and configuration.Temporary suspension.Resume from suspension.Agent activation.Normal shutdown. -
Method Summary
Modifier and TypeMethodDescriptionstatic Lifecycle.PhaseReturns the enum constant of this class with the specified name.static Lifecycle.Phase[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INIT
Agent instantiation and configuration.Called once when agent is created.
-
START
Agent activation.Called when agent starts processing.
-
PAUSE
Temporary suspension.Called when agent is paused.
-
RESUME
Resume from suspension.Called when agent resumes from pause.
-
STOP
Normal shutdown.Called when agent is stopped gracefully.
-
DESTROY
Final cleanup.Called before agent is destroyed.
-
ERROR
Error handling.Called when an unhandled error occurs.
Method should accept
Throwableparameter. -
BEFORE_TASK
Before each task execution.Called before processing each task.
-
AFTER_TASK
After each task execution.Called after processing each task.
-
HEARTBEAT
Periodic heartbeat.Called periodically for health checks.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-