AgentRunRegistry
@Component public final class AgentRunRegistry
源码Source
io/agentscope/builder/web/managed/AgentRunRegistry.java:25–56智能体运行注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed 包。核心成员包括 register、find、cancel。
Local execution ownership. Cross-replica routing belongs to the turn coordinator.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void register(String ownerId, String sessionId, AgentRun<?> run) | 执行注册相关操作。 Register before subscribing; all terminal outcomes remove the exact entry automatically. |
public Optional<AgentRun<?>> find(String ownerId, String sessionId, String runId) | 执行查找相关操作。 Performs the find operation. |
public boolean cancel(String ownerId, String sessionId, String runId) | 执行取消相关操作。 Performs the cancel operation. |
方法详情Method Detail
register
public void register(String ownerId, String sessionId, AgentRun<?> run)
执行注册相关操作。
Register before subscribing; all terminal outcomes remove the exact entry automatically.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
run | AgentRun<?> | 运行(类型 `AgentRun`)。The run. |
源码Source
io/agentscope/builder/web/managed/AgentRunRegistry.java:32–42find
public Optional<AgentRun<?>> find(String ownerId, String sessionId, String runId)
执行查找相关操作。
Performs the find operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
runId | String | 运行标识(类型 `String`)。The run id. |
Optional<AgentRun<?>>返回可选>。Returns optional.
源码Source
io/agentscope/builder/web/managed/AgentRunRegistry.java:44–51cancel
public boolean cancel(String ownerId, String sessionId, String runId)
执行取消相关操作。
Performs the cancel operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
runId | String | 运行标识(类型 `String`)。The run id. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/builder/web/managed/AgentRunRegistry.java:53–55