Class McpClientConfig.BuilderBase<BUILDER extends McpClientConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends McpClientConfig>
java.lang.Object
io.helidon.integrations.langchain4j.McpClientConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
McpClientConfig.Builder
- Enclosing interface:
McpClientConfig
public abstract static class McpClientConfig.BuilderBase<BUILDER extends McpClientConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends McpClientConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
McpClientConfig
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClear existing value of this property.Clear existing value of this property.Clear existing value of this property.clearKey()
Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Sets the name that the client will use to identify itself to the MCP server in the initialization message.clientName
(String clientName) Sets the name that the client will use to identify itself to the MCP server in the initialization message.Sets the version string that the client will use to identify itself to the MCP server in the initialization message.clientVersion
(String clientVersion) Sets the version string that the client will use to identify itself to the MCP server in the initialization message.config()
If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).from
(McpClientConfig prototype) Update this builder from an existing prototype instance.from
(McpClientConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Sets the timeout for initializing the client.initializationTimeout
(Duration initializationTimeout) Sets the timeout for initializing the client.key()
Sets a unique identifier for the client.Sets a unique identifier for the client.Whether to log request traffic.logRequests
(boolean logRequests) Whether to log request traffic.Whether to log response traffic.logResponses
(boolean logResponses) Whether to log response traffic.The timeout to apply when waiting for a ping response.pingTimeout
(Duration pingTimeout) The timeout to apply when waiting for a ping response.protected void
Handles providers and decorators.The timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt).promptsTimeout
(Duration promptsTimeout) The timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt).Sets the protocol version that the client will advertise in the initialization message.protocolVersion
(String protocolVersion) Sets the protocol version that the client will advertise in the initialization message.The delay before attempting to reconnect after a failed connection.reconnectInterval
(Duration reconnectInterval) The delay before attempting to reconnect after a failed connection.Sets the timeout for resource-related operations (listing resources as well as reading the contents of a resource).resourcesTimeout
(Duration resourcesTimeout) Sets the timeout for resource-related operations (listing resources as well as reading the contents of a resource).sseUri()
The initial URI where to connect to the server and request a SSE channel.The initial URI where to connect to the server and request a SSE channel.Sets the timeout for tool execution.toolExecutionTimeout
(Duration toolExecutionTimeout) Sets the timeout for tool execution.The error message to return when a tool execution times out.toolExecutionTimeoutErrorMessage
(String toolExecutionTimeoutErrorMessage) The error message to return when a tool execution times out.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends McpClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends McpClientConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends McpClientConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends McpClientConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
sseUri
The initial URI where to connect to the server and request a SSE channel.- Parameters:
sseUri
- sse uri- Returns:
- updated builder instance
- See Also:
-
clearClientName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
clientName
Sets the name that the client will use to identify itself to the MCP server in the initialization message. Overwrites the default client name from langchain4j.- Parameters:
clientName
- client name- Returns:
- updated builder instance
- See Also:
-
clearClientVersion
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
clientVersion
Sets the version string that the client will use to identify itself to the MCP server in the initialization message. Overwrites the default client version from langchain4j.- Parameters:
clientVersion
- client version- Returns:
- updated builder instance
- See Also:
-
clearKey
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
key
Sets a unique identifier for the client. If none is provided, a UUID will be automatically generated. This key is later used to identify the client in the service registry.- Parameters:
key
- client key- Returns:
- updated builder instance
- See Also:
-
clearProtocolVersion
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
protocolVersion
Sets the protocol version that the client will advertise in the initialization message. Overwrites the default version from langchain4j.- Parameters:
protocolVersion
- protocol version- Returns:
- updated builder instance
- See Also:
-
clearInitializationTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
initializationTimeout
Sets the timeout for initializing the client. Overwrites the default timeout for initializing from langchain4j.- Parameters:
initializationTimeout
- initialization timout- Returns:
- updated builder instance
- See Also:
-
clearToolExecutionTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
toolExecutionTimeout
Sets the timeout for tool execution. This value applies to each tool execution individually. A value of zero means no timeout. Overwrites the default timeout for tool execution from langchain4j.- Parameters:
toolExecutionTimeout
- tool execution timout- Returns:
- updated builder instance
- See Also:
-
clearResourcesTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
resourcesTimeout
Sets the timeout for resource-related operations (listing resources as well as reading the contents of a resource). A value of zero means no timeout. Overwrites the default timeout for resource-related operations from langchain4j.- Parameters:
resourcesTimeout
- resources timeout- Returns:
- updated builder instance
- See Also:
-
clearPromptsTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
promptsTimeout
The timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt). A value of zero means no timeout. Overwrites the default timeout for prompt-related operations from langchain4j.- Parameters:
promptsTimeout
- prompts timeout- Returns:
- updated builder instance
- See Also:
-
clearPingTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
pingTimeout
The timeout to apply when waiting for a ping response. Overwrites the default timeout when waiting for a ping response from langchain4j.- Parameters:
pingTimeout
- ping timeout- Returns:
- updated builder instance
- See Also:
-
clearReconnectInterval
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
reconnectInterval
The delay before attempting to reconnect after a failed connection. Overwrites the default reconnect interval from langchain4j.- Parameters:
reconnectInterval
- reconnect interval- Returns:
- updated builder instance
- See Also:
-
clearToolExecutionTimeoutErrorMessage
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
toolExecutionTimeoutErrorMessage
The error message to return when a tool execution times out. Overwrites the default error message from langchain4j.- Parameters:
toolExecutionTimeoutErrorMessage
- time out error message- Returns:
- updated builder instance
- See Also:
-
clearLogRequests
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
logRequests
Whether to log request traffic.- Parameters:
logRequests
- log request traffic- Returns:
- updated builder instance
- See Also:
-
clearLogResponses
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
logResponses
Whether to log response traffic.- Parameters:
logResponses
- log response traffic- Returns:
- updated builder instance
- See Also:
-
sseUri
The initial URI where to connect to the server and request a SSE channel.- Returns:
- the sse uri
-
clientName
Sets the name that the client will use to identify itself to the MCP server in the initialization message. Overwrites the default client name from langchain4j.- Returns:
- the client name
-
clientVersion
Sets the version string that the client will use to identify itself to the MCP server in the initialization message. Overwrites the default client version from langchain4j.- Returns:
- the client version
-
key
Sets a unique identifier for the client. If none is provided, a UUID will be automatically generated. This key is later used to identify the client in the service registry.- Returns:
- the key
-
protocolVersion
Sets the protocol version that the client will advertise in the initialization message. Overwrites the default version from langchain4j.- Returns:
- the protocol version
-
initializationTimeout
Sets the timeout for initializing the client. Overwrites the default timeout for initializing from langchain4j.- Returns:
- the initialization timeout
-
toolExecutionTimeout
Sets the timeout for tool execution. This value applies to each tool execution individually. A value of zero means no timeout. Overwrites the default timeout for tool execution from langchain4j.- Returns:
- the tool execution timeout
-
resourcesTimeout
Sets the timeout for resource-related operations (listing resources as well as reading the contents of a resource). A value of zero means no timeout. Overwrites the default timeout for resource-related operations from langchain4j.- Returns:
- the resources timeout
-
promptsTimeout
The timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt). A value of zero means no timeout. Overwrites the default timeout for prompt-related operations from langchain4j.- Returns:
- the prompts timeout
-
pingTimeout
The timeout to apply when waiting for a ping response. Overwrites the default timeout when waiting for a ping response from langchain4j.- Returns:
- the ping timeout
-
reconnectInterval
The delay before attempting to reconnect after a failed connection. Overwrites the default reconnect interval from langchain4j.- Returns:
- the reconnect interval
-
toolExecutionTimeoutErrorMessage
The error message to return when a tool execution times out. Overwrites the default error message from langchain4j.- Returns:
- the tool execution timeout error message
-
logRequests
Whether to log request traffic.- Returns:
- the log requests
-
logResponses
Whether to log response traffic.- Returns:
- the log responses
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
config(io.helidon.config.Config)