SchedulerChannelRuntime
@Component public class SchedulerChannelRuntime implements SmartLifecycle
源码Source
io/agentscope/builder/web/config/SchedulerChannelRuntime.java:57–356调度器渠道运行时,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.config 包,实现 SmartLifecycle。核心成员包括 start、stop、isRunning、SchedulerChannelRuntime。
Scheduler channel runtime: owns the live set of IM channel adapters, refreshes config from the control plane on an interval, and reports per-channel started/error status.
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void start() | 执行启动相关操作。 Returns the start. |
public void stop() | 执行停止相关操作。 Returns the stop. |
public boolean isRunning() | 判断是否运行中。 Returns whether the running. |
构造器详情Constructor Detail
SchedulerChannelRuntime
public SchedulerChannelRuntime(ChannelManager channelManager, Gateway gateway, WebClient controlPlane, ObjectMapper objectMapper, ChannelRuntimeCatalog catalog, int configFetchRetries, long backoffMs, long refreshIntervalMs)
初始化 SchedulerChannelRuntime 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelManager | ChannelManager | 渠道管理器(类型 `ChannelManager`)。The channel manager. |
gateway | Gateway | 网关(类型 `Gateway`)。The gateway. |
controlPlane | WebClient | 控制面(类型 `WebClient`)。The control plane. |
objectMapper | ObjectMapper | 对象 Mapper(类型 `ObjectMapper`)。The object mapper. |
catalog | ChannelRuntimeCatalog | 目录(类型 `ChannelRuntimeCatalog`)。The catalog. |
configFetchRetries | int | 配置 Fetch 重试(类型 `int`)。The config fetch retries. |
backoffMs | long | 退避 Ms(类型 `long`)。The backoff ms. |
refreshIntervalMs | long | 刷新间隔 Ms(类型 `long`)。The refresh interval ms. |
源码Source
io/agentscope/builder/web/config/SchedulerChannelRuntime.java:90–107方法详情Method Detail
start
public void start()
执行启动相关操作。
Returns the start.
源码Source
io/agentscope/builder/web/config/SchedulerChannelRuntime.java:122–141stop
public void stop()
执行停止相关操作。
Returns the stop.
源码Source
io/agentscope/builder/web/config/SchedulerChannelRuntime.java:143–163isRunning
public boolean isRunning()
判断是否运行中。
Returns whether the running.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/builder/web/config/SchedulerChannelRuntime.java:165–168