Enum Class PluginState

java.lang.Object
java.lang.Enum<PluginState>
cloud.opencode.base.classloader.plugin.PluginState
All Implemented Interfaces:
Serializable, Comparable<PluginState>, Constable

public enum PluginState extends Enum<PluginState>
Plugin lifecycle state enumeration 插件生命周期状态枚举

Represents the possible states of a plugin within the managed lifecycle: DISCOVERED → LOADED → STARTED → STOPPED → UNLOADED. A plugin may transition to FAILED from any active state.

表示插件在托管生命周期中的可能状态: DISCOVERED → LOADED → STARTED → STOPPED → UNLOADED。 插件可以从任何活动状态转换为 FAILED。

Security | 安全性:

  • Thread-safe: Yes (immutable enum) - 线程安全: 是 (不可变枚举)
Since:
JDK 25, opencode-base-classloader V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • DISCOVERED

      public static final PluginState DISCOVERED
      Plugin JAR discovered on disk but not yet loaded 插件 JAR 在磁盘上被发现但尚未加载
    • LOADED

      public static final PluginState LOADED
      Plugin class loaded and instantiated 插件类已加载并实例化
    • STARTED

      public static final PluginState STARTED
      Plugin started and running 插件已启动并运行
    • STOPPED

      public static final PluginState STOPPED
      Plugin stopped gracefully 插件已正常停止
    • UNLOADED

      public static final PluginState UNLOADED
      Plugin unloaded, ClassLoader closed 插件已卸载,ClassLoader 已关闭
    • FAILED

      public static final PluginState FAILED
      Plugin encountered an error during lifecycle transition 插件在生命周期转换过程中遇到错误
  • Method Details

    • values

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