A2aJsonRpcController
@RestController @RequestMapping("/") public class A2aJsonRpcController
源码Source
io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:36–94A 2 a JSON Rpc 控制器,支持智能体之间的发现、委派与协作。位于 io.agentscope.spring.boot.a2a.controller 包。核心成员包括 handleRequest、A2aJsonRpcController。
A class in io.agentscope.spring.boot.a2a.controller that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.spring.boot.a2a.controller.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public A2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer) | 初始化 `A2aJsonRpcController` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Object handleRequest(String body, Map<String, String> header) | 处理请求。 Performs the handle request operation. |
构造器详情Constructor Detail
A2aJsonRpcController
public A2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)
初始化 A2aJsonRpcController 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentScopeA2aServer | AgentScopeA2aServer | 智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server. |
源码Source
io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:46–48方法详情Method Detail
handleRequest
public Object handleRequest(String body, Map<String, String> header)
处理请求。
Performs the handle request operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
body | String | 正文(类型 `String`)。The body. |
header | Map<String, String> | 请求头(类型 `Map`)。The header. |
Object返回对象。Returns object.
源码Source
io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:50–66