Class AbstractMcpClient.Builder<SELF extends AbstractMcpClient.Builder<SELF>>

java.lang.Object
org.apache.juneau.rest.client.mcp.AbstractMcpClient.Builder<SELF>
Type Parameters:
SELF - The concrete builder type (CRTP self-type), allowing dated adapters to add their own builder methods while preserving fluent chaining.
Direct Known Subclasses:
McpClient.Builder, McpClient.Builder
Enclosing class:
AbstractMcpClient

public abstract static class AbstractMcpClient.Builder<SELF extends AbstractMcpClient.Builder<SELF>> extends Object
Fluent, self-typed builder for AbstractMcpClient subclasses.
Since:
10.0.0
  • Constructor Details

  • Method Details

    • endpoint

      public SELF endpoint(String value)
      Sets the MCP server endpoint URL.
      Parameters:
      value - The absolute endpoint URL (e.g. "http://localhost:8080/mcp"). Must not be null.
      Returns:
      This object.
    • transport

      public SELF transport(HttpTransport value)
      Sets the HTTP transport used by the underlying RestClient.
      Parameters:
      value - The transport. Can be null (a transport is auto-discovered via ServiceLoader).
      Returns:
      This object.
    • interceptor

      Adds a lifecycle interceptor (e.g. the auth-token seam) to the underlying RestClient.
      Parameters:
      value - The interceptor to add. Must not be null.
      Returns:
      This object.
    • self

      protected SELF self()