Enum Class AiExecutePhase

java.lang.Object
java.lang.Enum<AiExecutePhase>
com.aispect.agent.enumeration.AiExecutePhase
All Implemented Interfaces:
Serializable, Comparable<AiExecutePhase>, Constable

public enum AiExecutePhase extends Enum<AiExecutePhase>
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 Constants
    Enum Constant
    Description
    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.
    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 Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BEFORE

      public static final AiExecutePhase 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

      public static final AiExecutePhase 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

      public static final AiExecutePhase 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

      public static final AiExecutePhase 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

      public static AiExecutePhase[] 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 AiExecutePhase 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