AS AgentScopeAPI 手册 / API Reference

AgentscopeShutdownEndpoint

@Endpoint(id = "agentscope-shutdown") public class AgentscopeShutdownEndpoint
源码Source io/agentscope/spring/boot/admin/endpoint/AgentscopeShutdownEndpoint.java:42–110

Agentscope Shutdown 端点,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.endpoint 包。核心成员包括 shutdown、AgentscopeShutdownEndpoint。

POST /actuator/agentscope-shutdown: drain, then schedule a JVM-level shutdown.

Distinct from Spring Boot's own /actuator/shutdown in that it first calls GracefulShutdownManager#performGracefulShutdown() so any in-flight reasoning gets a chance to checkpoint its io.agentscope.core.state.AgentState, only then closing the Spring ConfigurableApplicationContext.

The actual System.exit or container teardown is left to the container — this method closes the Spring context on a background thread and returns immediately.

构造器摘要Constructor Summary

构造器Constructor说明Description
public AgentscopeShutdownEndpoint(AdminProperties properties, AdminAuditLogger audit, ApplicationContext appContext)
初始化 `AgentscopeShutdownEndpoint` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Map<String, Object> shutdown(String confirm, String token, Long awaitMillis)
关闭资源并释放连接。
Releases resources and connections.

构造器详情Constructor Detail

AgentscopeShutdownEndpoint

public AgentscopeShutdownEndpoint(AdminProperties properties, AdminAuditLogger audit, ApplicationContext appContext)

初始化 AgentscopeShutdownEndpoint 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
auditAdminAuditLoggeraudit(类型 `AdminAuditLogger`)。The audit.
appContextApplicationContext应用上下文(类型 `ApplicationContext`)。The app context.
源码Source io/agentscope/spring/boot/admin/endpoint/AgentscopeShutdownEndpoint.java:51–56

方法详情Method Detail

shutdown

public Map<String, Object> shutdown(String confirm, String token, Long awaitMillis)

关闭资源并释放连接。

Releases resources and connections.

参数Parameters
名称Name类型Type说明Description
confirmString确认(类型 `String`)。The confirm.
tokenString令牌(类型 `String`)。The token.
awaitMillisLongawait 毫秒(类型 `Long`)。The await millis.
返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/spring/boot/admin/endpoint/AgentscopeShutdownEndpoint.java:58–109
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.