AS AgentScopeAPI 手册 / API Reference

WeixinOutboundClient

public final class WeixinOutboundClient
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:35–297

Weixin 出站客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.weixin 包。核心成员包括 send、sendWithContext、updates、notifyStart、notifyStop、WeixinOutboundClient。

Minimal iLink JSON client for text send and update polling.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
JsonNodeResponse记录record
承载 JSON 节点响应数据的记录类型。
A record in io.agentscope.extensions.channel.weixin that carries data used when components connects agents to messaging channels and enterprise platforms.

构造器摘要Constructor Summary

构造器Constructor说明Description
public WeixinOutboundClient(WeixinChannelProperties p, WeixinCredentialProvider credentials)
初始化 `WeixinOutboundClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<Void> send(OutboundAddress address, List<Msg> messages)
执行发送相关操作。
Performs the send operation.
public Mono<Void> sendWithContext(OutboundAddress address, List<Msg> messages, String context)
发送使用上下文。
Sends the with context.
public JsonNodeResponse updates(String cursor) throws Exception
设置该参数。
Performs the updates operation.
public void notifyStart() throws Exception
执行 `notifyStart` 方法。
Returns the notify start.
public void notifyStop() throws Exception
执行 `notifyStop` 方法。
Returns the notify stop.

构造器详情Constructor Detail

WeixinOutboundClient

public WeixinOutboundClient(WeixinChannelProperties p, WeixinCredentialProvider credentials)

初始化 WeixinOutboundClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
pWeixinChannelPropertiesp(类型 `WeixinChannelProperties`)。The p.
credentialsWeixinCredentialProvider凭证(类型 `WeixinCredentialProvider`)。The credentials.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:41–48

方法详情Method Detail

send

public Mono<Void> send(OutboundAddress address, List<Msg> messages)

执行发送相关操作。

Performs the send operation.

参数Parameters
名称Name类型Type说明Description
addressOutboundAddressaddress(类型 `OutboundAddress`)。The address.
messagesList<Msg>消息列表(类型 `List`)。The messages.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:50–52

sendWithContext

public Mono<Void> sendWithContext(OutboundAddress address, List<Msg> messages, String context)

发送使用上下文。

Sends the with context.

参数Parameters
名称Name类型Type说明Description
addressOutboundAddressaddress(类型 `OutboundAddress`)。The address.
messagesList<Msg>消息列表(类型 `List`)。The messages.
contextString上下文(类型 `String`)。The context.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:54–56

updates

public JsonNodeResponse updates(String cursor) throws Exception

设置该参数。

Performs the updates operation.

参数Parameters
名称Name类型Type说明Description
cursorString游标(类型 `String`)。The cursor.
返回Returns JsonNodeResponse
返回JsonNodeResponse。Returns json node response.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:133–155

notifyStart

public void notifyStart() throws Exception

执行 notifyStart 方法。

Returns the notify start.

抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:157–159

notifyStop

public void notifyStop() throws Exception

执行 notifyStop 方法。

Returns the notify stop.

抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:167–169

嵌套类详情Nested Class Detail

JsonNodeResponse

public record JsonNodeResponse( int ret, Integer errcode, String errmsg, List<com.fasterxml.jackson.databind.JsonNode> msgs, String get_updates_buf, Integer longpolling_timeout_ms)

承载 JSON 节点响应数据的记录类型。位于 io.agentscope.extensions.channel.weixin 包。核心成员包括 ret、errcode、errmsg、msgs、get_updates_buf、longpolling_timeout_ms。

A record in io.agentscope.extensions.channel.weixin that carries data used when components connects agents to messaging channels and enterprise platforms. Declared in io.agentscope.extensions.channel.weixin.

基于官方固定版本源码静态生成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.