AgentscopeShutdownEndpoint
@Endpoint(id = "agentscope-shutdown") public class AgentscopeShutdownEndpoint
源码Source
io/agentscope/spring/boot/admin/endpoint/AgentscopeShutdownEndpoint.java:42–110Agentscope 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
方法摘要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 |
|---|---|---|
properties | AdminProperties | 属性(类型 `AdminProperties`)。The properties. |
audit | AdminAuditLogger | audit(类型 `AdminAuditLogger`)。The audit. |
appContext | ApplicationContext | 应用上下文(类型 `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 |
|---|---|---|
confirm | String | 确认(类型 `String`)。The confirm. |
token | String | 令牌(类型 `String`)。The token. |
awaitMillis | Long | await 毫秒(类型 `Long`)。The await millis. |
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/spring/boot/admin/endpoint/AgentscopeShutdownEndpoint.java:58–109