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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the MCP server endpoint URL.interceptor(RestCallInterceptor value) Adds a lifecycle interceptor (e.g. the auth-token seam) to the underlyingRestClient.protected SELFself()transport(HttpTransport value) Sets the HTTP transport used by the underlyingRestClient.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
endpoint
Sets the MCP server endpoint URL.- Parameters:
value- The absolute endpoint URL (e.g."http://localhost:8080/mcp"). Must not benull .- Returns:
- This object.
-
transport
Sets the HTTP transport used by the underlyingRestClient.- Parameters:
value- The transport. Can benull (a transport is auto-discovered viaServiceLoader).- Returns:
- This object.
-
interceptor
Adds a lifecycle interceptor (e.g. the auth-token seam) to the underlyingRestClient.- Parameters:
value- The interceptor to add. Must not benull .- Returns:
- This object.
-
self
-