Class AdminCommandRegistry

java.lang.Object
io.agentscope.spring.boot.admin.command.AdminCommandRegistry

public final class AdminCommandRegistry extends Object
Thread-safe registry of AdminCommand instances.

Built-in commands are populated by BuiltinCommandRegistrar at startup. Third-party starters (or business code) may inject additional commands via register(AdminCommand) — the registry is the single source of truth that powers the /actuator/agentscope-commands catalog.

  • Constructor Details

    • AdminCommandRegistry

      public AdminCommandRegistry()
  • Method Details

    • register

      public void register(AdminCommand command)
      Register a command. Idempotent on identical entries; throws if a different command with the same id already exists.
    • find

      public Optional<AdminCommand> find(String id)
    • list

      public List<AdminCommand> list()
      All registered commands, sorted by category then id for stable output.
    • size

      public int size()