Package com.aispect.agent.enumeration
Enum Class AiExecutePhase
- All Implemented Interfaces:
Serializable,Comparable<AiExecutePhase>,Constable
logo AI The stage of the execution life cycle when the proxy intercepts the proxied method.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRuns after the target method has successfully executed. It is suitable for scenarios such as summarizing, format conversion, and secondary processing of returned results. can pass `AiInvocationContext.getProceedResult()` Get the execution result of the original method.Orbiting around. AI The agent is responsible for fully taking over the call chain and deciding for itself whether and when to pass `ctx.proceed()` Call the original method. This is the most flexible way and is the default.Runs before the target method is executed. Suitable for parameter verification, security review, logging and other scenarios. AI The return value of usually does not affect the normal flow of execution unless explicitly short-circuited in a particular implementation.Runs when the target method execution throws an exception. It is suitable for scenarios such as exception classification, return of hidden data, self-healing and retry, etc. can pass `AiInvocationContext.getError()` Get the exception thrown. -
Method Summary
Modifier and TypeMethodDescriptionstatic AiExecutePhaseReturns the enum constant of this class with the specified name.static AiExecutePhase[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BEFORE
Runs before the target method is executed. Suitable for parameter verification, security review, logging and other scenarios. AI The return value of usually does not affect the normal flow of execution unless explicitly short-circuited in a particular implementation. -
AFTER
Runs after the target method has successfully executed. It is suitable for scenarios such as summarizing, format conversion, and secondary processing of returned results. can pass `AiInvocationContext.getProceedResult()` Get the execution result of the original method. -
EXCEPTION
Runs when the target method execution throws an exception. It is suitable for scenarios such as exception classification, return of hidden data, self-healing and retry, etc. can pass `AiInvocationContext.getError()` Get the exception thrown. -
ALL
Orbiting around. AI The agent is responsible for fully taking over the call chain and deciding for itself whether and when to pass `ctx.proceed()` Call the original method. This is the most flexible way and is the default.
-
-
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
-