McpServerRegistrationResult
public record McpServerRegistrationResult( String serverName, String transport, Status status, Instant completedAt, Throwable cause)
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70承载 MCP 服务端注册结果数据的记录类型。位于 io.agentscope.harness.agent.tools 包。核心成员包括 serverName、transport、status、completedAt、cause、success。
Terminal result of registering one MCP server entry.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
serverName | String | 执行服务端名称相关操作。 configured server name; may be `null` for a skipped invalid entry |
transport | String | 执行传输层相关操作。 configured transport; may be `null` when absent or unavailable |
status | Status | 执行状态相关操作。 terminal registration status |
completedAt | Instant | 执行已完成 At相关操作。 time at which registration reached the terminal status |
cause | Throwable | 执行 `cause` 方法。 failure or skip cause; `null` for successful registration |
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Status | 枚举enum | 定义状态的枚举。 Terminal status of an MCP server registration attempt. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public McpServerRegistrationResult(String serverName, String transport, Status status, Instant completedAt, Throwable cause) | 初始化 `McpServerRegistrationResult` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static McpServerRegistrationResult success(String serverName, String transport)static | 执行成功相关操作。 Creates a successful registration result. |
public static McpServerRegistrationResult failed(String serverName, String transport, Throwable cause)static | 创建失败注册结果。 Creates a failed registration result. |
public static McpServerRegistrationResult skipped(String serverName, String transport, Throwable cause)static | 创建已跳过注册结果。 Creates a skipped registration result. |
记录组件详情Record Component Detail
serverName
String serverName执行服务端名称相关操作。
configured server name; may be null for a skipped invalid entry
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70transport
String transport执行传输层相关操作。
configured transport; may be null when absent or unavailable
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70status
Status status执行状态相关操作。
terminal registration status
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70completedAt
Instant completedAt执行已完成 At相关操作。
time at which registration reached the terminal status
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70cause
Throwable cause执行 cause 方法。
failure or skip cause; null for successful registration
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:30–70构造器详情Constructor Detail
McpServerRegistrationResult
public McpServerRegistrationResult(String serverName, String transport, Status status, Instant completedAt, Throwable cause)
初始化 McpServerRegistrationResult 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
serverName | String | 服务端名称(类型 `String`)。The server name. |
transport | String | 传输层(类型 `String`)。The transport. |
status | Status | 状态(类型 `Status`)。The status. |
completedAt | Instant | 已完成 At(类型 `Instant`)。The completed at. |
cause | Throwable | cause(类型 `Throwable`)。The cause. |
io/agentscope/harness/agent/tools/McpServerRegistrationResult.java:33–42方法详情Method Detail
success
public static McpServerRegistrationResult success(String serverName, String transport)
执行成功相关操作。
Creates a successful registration result.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
serverName | String | 服务端名称(类型 `String`)。The server name. |
transport | String | 传输层(类型 `String`)。The transport. |
McpServerRegistrationResultio/agentscope/harness/agent/tools/McpServerRegistrationResult.java:52–55failed
public static McpServerRegistrationResult failed(String serverName, String transport, Throwable cause)
创建失败注册结果。
Creates a failed registration result.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
serverName | String | 服务端名称(类型 `String`)。The server name. |
transport | String | 传输层(类型 `String`)。The transport. |
cause | Throwable | cause(类型 `Throwable`)。The cause. |
McpServerRegistrationResultio/agentscope/harness/agent/tools/McpServerRegistrationResult.java:58–62skipped
public static McpServerRegistrationResult skipped(String serverName, String transport, Throwable cause)
创建已跳过注册结果。
Creates a skipped registration result.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
serverName | String | 服务端名称(类型 `String`)。The server name. |
transport | String | 传输层(类型 `String`)。The transport. |
cause | Throwable | cause(类型 `Throwable`)。The cause. |
McpServerRegistrationResultio/agentscope/harness/agent/tools/McpServerRegistrationResult.java:65–69嵌套类详情Nested Class Detail
Status
public enum Status定义状态的枚举。位于 io.agentscope.harness.agent.tools 包。核心成员包括 SUCCESS、FAILED、SKIPPED。
Terminal status of an MCP server registration attempt.