接口:McpTransportBuilder
- All Known Implementing Classes:
DefaultMcpTransportBuilder
public interface McpTransportBuilder
用于创建 McpClientTransport 实例的接口。实现该接口的类负责根据提供的连接参数来构建具体的 McpClientTransport 对象。
-
方法概述
-
方法详细信息(Method Details)
-
build
根据提供的连接参数,创建一个 McpClientTransport 对象。- Parameters:
connectionParams- The parameters required to configure the transport. The type of this object determines the type of transport built.- Returns:
- An instance of McpClientTransport.
- Throws:
IllegalArgumentException- if the connectionParams are not supported or invalid.
-