ChannelFactory
@FunctionalInterface public interface ChannelFactory
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelFactory.java:24–36定义渠道工厂契约的接口。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 create。
Constructs a Channel instance from the resolved routing config and provider-specific
properties.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Channel create(String channelId, ChannelConfig routing, Map<String, Object> properties) | 构建渠道。 Build the channel. |
方法详情Method Detail
create
public Channel create(String channelId, ChannelConfig routing, Map<String, Object> properties)
构建渠道。
Build the channel.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。the logical channel id |
routing | ChannelConfig | 路由(类型 `ChannelConfig`)。the parsed routing config (defaultAgentId, dmScope, bindings) |
properties | Map<String, Object> | 属性(类型 `Map`)。provider-specific properties; never null but may be empty |
Channel返回渠道。a fully constructed channel ready for `init(Gateway)` + `start()`
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelFactory.java:35