SchedulerGateway
@Component public class SchedulerGateway implements Gateway
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:30–66调度器网关,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime 包,实现 Gateway。核心成员包括 bindMainAgent、run、SchedulerGateway。
Scheduler transport gateway. The control plane owns identity, routing and durable work intake.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SchedulerGateway(io.agentscope.builder.web.managed.ChannelWorkBridge work) | 初始化 `SchedulerGateway` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
SchedulerGateway
public SchedulerGateway(io.agentscope.builder.web.managed.ChannelWorkBridge work)
初始化 SchedulerGateway 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
work | io.agentscope.builder.web.managed.ChannelWorkBridge | work(类型 `io.agentscope.builder.web.managed.ChannelWorkBridge`)。The work. |
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:37–39方法详情Method Detail
bindMainAgent
public void bindMainAgent(HarnessAgent agent)
设置该参数。
No-op: the scheduler runs no local agents.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | HarnessAgent | 智能体(类型 `HarnessAgent`)。The agent. |
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:42–45run
public Mono<Msg> run(MsgContext context, List<Msg> messages)
执行运行相关操作。
Performs the run operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | MsgContext | 上下文(类型 `MsgContext`)。The context. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
Mono<Msg>返回Mono。Returns mono.
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:47–50run
public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress outboundAddress)
执行运行相关操作。
Performs the run operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | MsgContext | 上下文(类型 `MsgContext`)。The context. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
outboundAddress | OutboundAddress | 出站 Address(类型 `OutboundAddress`)。The outbound address. |
Mono<Msg>返回Mono。Returns mono.
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:52–55run
public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress address, io.agentscope.core.agent.RuntimeContext callerContext, io.agentscope.harness.agent.gateway.channel.InboundMessage inbound)
执行运行相关操作。
Performs the run operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | MsgContext | 上下文(类型 `MsgContext`)。The context. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
callerContext | io.agentscope.core.agent.RuntimeContext | caller 上下文(类型 `io.agentscope.core.agent.RuntimeContext`)。The caller context. |
inbound | io.agentscope.harness.agent.gateway.channel.InboundMessage | 入站(类型 `io.agentscope.harness.agent.gateway.channel.InboundMessage`)。The inbound. |
Mono<Msg>返回Mono。Returns mono.
源码Source
io/agentscope/builder/runtime/SchedulerGateway.java:57–65