AS AgentScopeAPI 手册 / API Reference

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
channelIdString渠道标识(类型 `String`)。the logical channel id
routingChannelConfig路由(类型 `ChannelConfig`)。the parsed routing config (defaultAgentId, dmScope, bindings)
propertiesMap<String, Object>属性(类型 `Map`)。provider-specific properties; never null but may be empty
返回Returns Channel
返回渠道。a fully constructed channel ready for `init(Gateway)` + `start()`
源码Source io/agentscope/harness/agent/gateway/channel/ChannelFactory.java:35
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.