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 classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClear existing value of clientName.Clear existing value of clientVersion.Clear existing value of initializationTimeout.clearKey()Clear existing value of key.Clear existing value of logRequests.Clear existing value of logResponses.Clear existing value of pingTimeout.Clear existing value of promptsTimeout.Clear existing value of protocolVersion.Clear existing value of reconnectInterval.Clear existing value of resourcesTimeout.Clear existing value of toolExecutionTimeout.Clear existing value of toolExecutionTimeoutErrorMessage.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()Configuration used to configure this instance.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 voidHandles 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()Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useuriinsteadDeprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useuriinsteadSets 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()uri()The URL of the MCP server.The URL of the MCP server.protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
configin 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:
configin 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
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useuriinsteadThe initial URI where to connect to the server and request an SSE channel.- Parameters:
sseUri- sse uri- Returns:
- updated builder instance
- See Also:
-
uri
The URL of the MCP server.- Parameters:
uri- mcp server uri- Returns:
- updated builder instance
- See Also:
-
clearClientName
Clear existing value of clientName.- 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 clientVersion.- 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 key.- 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 protocolVersion.- 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 initializationTimeout.- 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 timeout- Returns:
- updated builder instance
- See Also:
-
clearToolExecutionTimeout
Clear existing value of toolExecutionTimeout.- 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 seconds means no timeout. Overwrites the default timeout for tool execution from langchain4j.- Parameters:
toolExecutionTimeout- tool execution timeout- Returns:
- updated builder instance
- See Also:
-
clearResourcesTimeout
Clear existing value of resourcesTimeout.- 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 seconds 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 promptsTimeout.- 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 seconds 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 pingTimeout.- 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 reconnectInterval.- 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 toolExecutionTimeoutErrorMessage.- 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 logRequests.- 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 logResponses.- Returns:
- updated builder instance
- See Also:
-
logResponses
Whether to log response traffic.- Parameters:
logResponses- log response traffic- Returns:
- updated builder instance
- See Also:
-
sseUri
Deprecated, for removal: This API element is subject to removal in a future version.This option is deprecated, useuriinsteadThe initial URI where to connect to the server and request an SSE channel.- Returns:
- sse uri
-
uri
The URL of the MCP server.- Returns:
- mcp server 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:
- 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:
- 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:
- client key
-
protocolVersion
Sets the protocol version that the client will advertise in the initialization message. Overwrites the default version from langchain4j.- Returns:
- protocol version
-
initializationTimeout
Sets the timeout for initializing the client. Overwrites the default timeout for initializing from langchain4j.- Returns:
- initialization timeout
-
toolExecutionTimeout
Sets the timeout for tool execution. This value applies to each tool execution individually. A value of zero seconds means no timeout. Overwrites the default timeout for tool execution from langchain4j.- Returns:
- 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 seconds means no timeout. Overwrites the default timeout for resource-related operations from langchain4j.- Returns:
- resources timeout
-
promptsTimeout
The timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt). A value of zero seconds means no timeout. Overwrites the default timeout for prompt-related operations from langchain4j.- Returns:
- 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:
- ping timeout
-
reconnectInterval
The delay before attempting to reconnect after a failed connection. Overwrites the default reconnect interval from langchain4j.- Returns:
- reconnect interval
-
toolExecutionTimeoutErrorMessage
The error message to return when a tool execution times out. Overwrites the default error message from langchain4j.- Returns:
- time out error message
-
logRequests
Whether to log request traffic.- Returns:
- log request traffic
-
logResponses
Whether to log response traffic.- Returns:
- log response traffic
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)