Record Class AdminCommand
java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.command.AdminCommand
- Record Components:
id- stable internal id, e.g.session.compacttitle- human-friendly label, e.g. "Compact session"category- coarse grouping, e.g.AgentStateStore,Agent,Systemplane- DATA = per-session REST; CONTROL = ActuatorhttpMethod- HTTP verb the command is reached with, e.g.GET,POSThttpPath- full route from the application root, e.g./v1/admin/sessions/{sessionId}:compactaliases- extra display aliases (CLI-style, e.g.summarize)writes- whether the command mutates state — disabled unlessagentscope.admin.write-enabled=trueidempotent- whether repeated invocation is safedescription- short one-liner shown in the catalog
public record AdminCommand(String id, String title, String category, CommandPlane plane, String httpMethod, String httpPath, List<String> aliases, boolean writes, boolean idempotent, String description)
extends Record
Self-describing record of an admin operation exposed by this starter.
The unified registry powers three views with the same metadata: REST routes, Actuator
endpoints, and a machine-readable /actuator/agentscope-commands catalog used by CLI /
Studio / Kubernetes operator clients.
-
Constructor Summary
ConstructorsConstructorDescriptionAdminCommand(String id, String title, String category, CommandPlane plane, String httpMethod, String httpPath, List<String> aliases, boolean writes, boolean idempotent, String description) Creates an instance of aAdminCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaliases()Returns the value of thealiasesrecord component.category()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehttpMethodrecord component.httpPath()Returns the value of thehttpPathrecord component.id()Returns the value of theidrecord component.booleanReturns the value of theidempotentrecord component.plane()Returns the value of theplanerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.booleanwrites()Returns the value of thewritesrecord component.
-
Constructor Details
-
AdminCommand
public AdminCommand(String id, String title, String category, CommandPlane plane, String httpMethod, String httpPath, List<String> aliases, boolean writes, boolean idempotent, String description) Creates an instance of aAdminCommandrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentcategory- the value for thecategoryrecord componentplane- the value for theplanerecord componenthttpMethod- the value for thehttpMethodrecord componenthttpPath- the value for thehttpPathrecord componentaliases- the value for thealiasesrecord componentwrites- the value for thewritesrecord componentidempotent- the value for theidempotentrecord componentdescription- the value for thedescriptionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
plane
Returns the value of theplanerecord component.- Returns:
- the value of the
planerecord component
-
httpMethod
Returns the value of thehttpMethodrecord component.- Returns:
- the value of the
httpMethodrecord component
-
httpPath
Returns the value of thehttpPathrecord component.- Returns:
- the value of the
httpPathrecord component
-
aliases
Returns the value of thealiasesrecord component.- Returns:
- the value of the
aliasesrecord component
-
writes
public boolean writes()Returns the value of thewritesrecord component.- Returns:
- the value of the
writesrecord component
-
idempotent
public boolean idempotent()Returns the value of theidempotentrecord component.- Returns:
- the value of the
idempotentrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-