WeComCallbackController
@RestController @RequestMapping("/api/channels/wecom") public class WeComCallbackController
源码Source
io/agentscope/extensions/channel/wecom/WeComCallbackController.java:49–213WeCom 回调控制器,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.extensions.channel.wecom 包。核心成员包括 verify、dispatch、WeComCallbackController。
Handles the WeCom callback URL handshake (GET) and inbound encrypted message delivery (POST).
Each WeComChannel registers itself with the controller at start-up; the controller
dispatches incoming requests by channelId extracted from the URL path. This avoids
Spring-side dynamic mapping registration and keeps wiring trivially testable.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public WeComCallbackController() | 初始化 `WeComCallbackController` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ResponseEntity<String> verify(String channelId, String signature, String timestamp, String nonce, String echostr) | 执行 `verify` 方法。 URL verification handshake. |
public Mono<ResponseEntity<String>> dispatch(String channelId, String signature, String timestamp, String nonce, String body) | 执行 `dispatch` 方法。 Inbound encrypted message. |
构造器详情Constructor Detail
WeComCallbackController
public WeComCallbackController()
初始化 WeComCallbackController 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/channel/wecom/WeComCallbackController.java:58–60方法详情Method Detail
verify
public ResponseEntity<String> verify(String channelId, String signature, String timestamp, String nonce, String echostr)
执行 verify 方法。
URL verification handshake.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
signature | String | signature(类型 `String`)。The signature. |
timestamp | String | 时间戳(类型 `String`)。The timestamp. |
nonce | String | nonce(类型 `String`)。The nonce. |
echostr | String | echostr(类型 `String`)。The echostr. |
ResponseEntity<String>返回ResponseEntity。Returns response entity.
源码Source
io/agentscope/extensions/channel/wecom/WeComCallbackController.java:72–99dispatch
public Mono<ResponseEntity<String>> dispatch(String channelId, String signature, String timestamp, String nonce, String body)
执行 dispatch 方法。
Inbound encrypted message.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
signature | String | signature(类型 `String`)。The signature. |
timestamp | String | 时间戳(类型 `String`)。The timestamp. |
nonce | String | nonce(类型 `String`)。The nonce. |
body | String | 正文(类型 `String`)。The body. |
Mono<ResponseEntity<String>>返回Mono>。Returns mono.
源码Source
io/agentscope/extensions/channel/wecom/WeComCallbackController.java:107–177