类 McpServerInfo.Builder<T extends McpServerInfo.Builder<T>>
java.lang.Object
com.github.codeboyzhou.mcp.declarative.server.McpServerInfo.Builder<T>
- 类型参数:
T- the type of the builder
- 封闭类:
- McpServerInfo
The builder class for
McpServerInfo.-
字段概要
字段修饰符和类型字段说明protected McpServerCapabilitiesThe capabilities of the MCP server.protected McpServerChangeNotificationThe change notification of the MCP server.protected StringThe instructions of the MCP server.protected StringThe name of the MCP server.protected DurationThe request timeout of the MCP server.protected StringThe version of the MCP server. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a new instance ofMcpServerInfowith the specified configuration.capabilities(McpServerCapabilities capabilities) Sets the capabilities of the MCP server.changeNotification(McpServerChangeNotification changeNotification) Sets the change notification of the MCP server.instructions(String instructions) Sets the instructions of the MCP server.Sets the name of the MCP server.requestTimeout(Duration requestTimeout) Sets the request timeout of the MCP server.protected Tself()Returns the self reference of the builder, which is used to chain the method calls and ensure the subclasses ofMcpServerInfocan also inherit the builder methods with parameterized type.Sets the version of the MCP server.
-
字段详细资料
-
name
The name of the MCP server. Default value is"mcp-server". -
version
The version of the MCP server. Default value is"1.0.0". -
instructions
The instructions of the MCP server. Default value isStringHelper.EMPTY. -
requestTimeout
The request timeout of the MCP server. Default value is20seconds. -
capabilities
The capabilities of the MCP server. Default value isMcpServerCapabilities.getDefault(). -
changeNotification
The change notification of the MCP server. Default value isMcpServerChangeNotification.getDefault().
-
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
self
Returns the self reference of the builder, which is used to chain the method calls and ensure the subclasses ofMcpServerInfocan also inherit the builder methods with parameterized type.- 返回:
- the self reference of the builder
-
build
Builds a new instance ofMcpServerInfowith the specified configuration.- 返回:
- a new instance of
McpServerInfo
-
name
Sets the name of the MCP server.- 参数:
name- the name of the MCP server- 返回:
- the self reference of the builder
-
version
Sets the version of the MCP server.- 参数:
version- the version of the MCP server- 返回:
- the self reference of the builder
-
instructions
Sets the instructions of the MCP server.- 参数:
instructions- the instructions of the MCP server- 返回:
- the self reference of the builder
-
requestTimeout
Sets the request timeout of the MCP server.- 参数:
requestTimeout- the request timeout of the MCP server- 返回:
- the self reference of the builder
-
capabilities
Sets the capabilities of the MCP server.- 参数:
capabilities- the capabilities of the MCP server- 返回:
- the self reference of the builder
-
changeNotification
Sets the change notification of the MCP server.- 参数:
changeNotification- the change notification of the MCP server- 返回:
- the self reference of the builder
-