Interface McpTransportBuilder

All Known Implementing Classes:
DefaultMcpTransportBuilder

public interface McpTransportBuilder
Interface for building McpClientTransport instances. Implementations of this interface are responsible for constructing concrete McpClientTransport objects based on the provided connection parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.modelcontextprotocol.spec.McpClientTransport
    build(Object connectionParams)
    Builds an McpClientTransport based on the provided connection parameters.
  • Method Details

    • build

      io.modelcontextprotocol.spec.McpClientTransport build(Object connectionParams)
      Builds an McpClientTransport based on the provided connection parameters.
      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.