WeixinOutboundClient
public final class WeixinOutboundClient
io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:35–297Weixin 出站客户端,封装与远端服务的连接和调用。位于 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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
p | WeixinChannelProperties | p(类型 `WeixinChannelProperties`)。The p. |
credentials | WeixinCredentialProvider | 凭证(类型 `WeixinCredentialProvider`)。The credentials. |
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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
Mono<Void>io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:50–52sendWithContext
public Mono<Void> sendWithContext(OutboundAddress address, List<Msg> messages, String context)
发送使用上下文。
Sends the with context.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
context | String | 上下文(类型 `String`)。The context. |
Mono<Void>io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:54–56updates
public JsonNodeResponse updates(String cursor) throws Exception
设置该参数。
Performs the updates operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cursor | String | 游标(类型 `String`)。The cursor. |
JsonNodeResponseException可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:133–155notifyStart
public void notifyStart() throws Exception
执行 notifyStart 方法。
Returns the notify start.
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/extensions/channel/weixin/WeixinOutboundClient.java:157–159notifyStop
public void notifyStop() throws Exception
执行 notifyStop 方法。
Returns the notify stop.
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
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.