Class McpServerInfo.Builder<T extends McpServerInfo.Builder<T>>

java.lang.Object
com.github.thought2code.mcp.annotated.server.McpServerInfo.Builder<T>
Type Parameters:
T - the type of the builder
Direct Known Subclasses:
McpSseServerInfo.Builder, McpStreamableServerInfo.Builder
Enclosing class:
McpServerInfo

@Deprecated(since="0.11.0", forRemoval=true) public static class McpServerInfo.Builder<T extends McpServerInfo.Builder<T>> extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
The builder class for McpServerInfo.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    The capabilities of the MCP server.
    Deprecated, for removal: This API element is subject to removal in a future version.
    The change notification of the MCP server.
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The instructions of the MCP server.
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The name of the MCP server.
    protected Duration
    Deprecated, for removal: This API element is subject to removal in a future version.
    The request timeout of the MCP server.
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The version of the MCP server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Builds a new instance of McpServerInfo with the specified configuration.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the capabilities of the MCP server.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the change notification of the MCP server.
    instructions(String instructions)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the instructions of the MCP server.
    name(String name)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the name of the MCP server.
    requestTimeout(Duration requestTimeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the request timeout of the MCP server.
    protected T
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the self reference of the builder, which is used to chain the method calls and ensure the subclasses of McpServerInfo can also inherit the builder methods with parameterized type.
    version(String version)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the version of the MCP server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      protected String name
      Deprecated, for removal: This API element is subject to removal in a future version.
      The name of the MCP server. Default value is "mcp-server".
    • version

      protected String version
      Deprecated, for removal: This API element is subject to removal in a future version.
      The version of the MCP server. Default value is "1.0.0".
    • instructions

      protected String instructions
      Deprecated, for removal: This API element is subject to removal in a future version.
      The instructions of the MCP server. Default value is StringHelper.EMPTY.
    • requestTimeout

      protected Duration requestTimeout
      Deprecated, for removal: This API element is subject to removal in a future version.
      The request timeout of the MCP server. Default value is 20 seconds.
    • capabilities

      protected McpServerCapabilities capabilities
      Deprecated, for removal: This API element is subject to removal in a future version.
      The capabilities of the MCP server. Default value is McpServerCapabilities.getDefault().
    • changeNotification

      protected McpServerChangeNotification changeNotification
      Deprecated, for removal: This API element is subject to removal in a future version.
      The change notification of the MCP server. Default value is McpServerChangeNotification.getDefault().
  • Constructor Details

    • Builder

      public Builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • self

      protected T self()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the self reference of the builder, which is used to chain the method calls and ensure the subclasses of McpServerInfo can also inherit the builder methods with parameterized type.
      Returns:
      the self reference of the builder
    • build

      public McpServerInfo build()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Builds a new instance of McpServerInfo with the specified configuration.
      Returns:
      a new instance of McpServerInfo
    • name

      public T name(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the name of the MCP server.
      Parameters:
      name - the name of the MCP server
      Returns:
      the self reference of the builder
    • version

      public T version(String version)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the version of the MCP server.
      Parameters:
      version - the version of the MCP server
      Returns:
      the self reference of the builder
    • instructions

      public T instructions(String instructions)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the instructions of the MCP server.
      Parameters:
      instructions - the instructions of the MCP server
      Returns:
      the self reference of the builder
    • requestTimeout

      public T requestTimeout(Duration requestTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the request timeout of the MCP server.
      Parameters:
      requestTimeout - the request timeout of the MCP server
      Returns:
      the self reference of the builder
    • capabilities

      public T capabilities(McpServerCapabilities capabilities)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the capabilities of the MCP server.
      Parameters:
      capabilities - the capabilities of the MCP server
      Returns:
      the self reference of the builder
    • changeNotification

      public T changeNotification(McpServerChangeNotification changeNotification)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the change notification of the MCP server.
      Parameters:
      changeNotification - the change notification of the MCP server
      Returns:
      the self reference of the builder