AS AgentScopeAPI 手册 / API Reference

ChannelTypeRegistry

public final class ChannelTypeRegistry
源码Source io/agentscope/builder/runtime/config/ChannelTypeRegistry.java:31–60

渠道类型注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime.config 包。核心成员包括 register、get、registeredTypes。

Registry of ChannelFactory implementations keyed by type. Pure SPI holder: the registry itself ships no built-in factories — the scheduler plane (which owns the channel adapters and their extension jars) registers the concrete types at startup. The control plane only reads #registeredTypes() for validation and type listings.

方法摘要Method Summary

方法Method说明Description
public static ChannelFactory register(String typeId, ChannelFactory factory)
static
执行注册相关操作。
Registers (or replaces) a factory under `typeId`.
public static Optional<ChannelFactory> get(String typeId)
static
返回工厂已注册用于`typeId`,if 任意。
Returns the factory registered for `typeId`, if any.
public static Set<String> registeredTypes()
static
返回已注册类型。
Returns an immutable snapshot of registered type ids.

方法详情Method Detail

register

public static ChannelFactory register(String typeId, ChannelFactory factory)
static

执行注册相关操作。

Registers (or replaces) a factory under typeId.

参数Parameters
名称Name类型Type说明Description
typeIdString类型标识(类型 `String`)。The type id.
factoryChannelFactory工厂(类型 `ChannelFactory`)。The factory.
返回Returns ChannelFactory
返回ChannelFactory。Returns channel factory.
源码Source io/agentscope/builder/runtime/config/ChannelTypeRegistry.java:42–46

get

public static Optional<ChannelFactory> get(String typeId)
static

返回工厂已注册用于typeId,if 任意。

Returns the factory registered for typeId, if any.

参数Parameters
名称Name类型Type说明Description
typeIdString类型标识(类型 `String`)。The type id.
返回Returns Optional<ChannelFactory>
返回可选。Returns optional.
源码Source io/agentscope/builder/runtime/config/ChannelTypeRegistry.java:49–54

registeredTypes

public static Set<String> registeredTypes()
static

返回已注册类型。

Returns an immutable snapshot of registered type ids.

返回Returns Set<String>
返回设置。Returns set.
源码Source io/agentscope/builder/runtime/config/ChannelTypeRegistry.java:57–59
基于官方固定版本源码静态生成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.