Record Class McpServerConfiguration
java.lang.Object
java.lang.Record
com.github.codeboyzhou.mcp.declarative.configuration.McpServerConfiguration
public record McpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable)
extends Record
This record represents the configuration of an MCP (Model Context Protocol) server.
It contains various properties such as enabled status, server mode, name, version, type, instructions, request timeout, capabilities, change notification, SSE (Server-Sent Events), and streamable configuration.
- 作者:
- codeboyzhou
- 另请参阅:
-
嵌套类概要
嵌套类 -
构造器概要
构造器构造器说明McpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable) 创建McpServerConfiguration记录的实例。 -
方法概要
修饰符和类型方法说明builder()Creates a new instance ofBuilderto buildMcpServerConfiguration.返回capabilities记录组件的值。返回changeNotification记录组件的值。enabled()返回enabled记录组件的值。final boolean指示某个其他对象是否“等于”此对象。static McpServerConfigurationReturns the default configuration of the MCP server.final inthashCode()返回此对象的哈希代码值。返回instructions记录组件的值。mode()返回mode记录组件的值。name()返回name记录组件的值。profile()返回profile记录组件的值。返回requestTimeout记录组件的值。sse()返回sse记录组件的值。返回streamable记录组件的值。final StringtoString()返回此记录的字符串表示形式。type()返回type记录组件的值。version()返回version记录组件的值。
-
构造器详细资料
-
McpServerConfiguration
public McpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable) 创建McpServerConfiguration记录的实例。- 参数:
profile-profile记录组件的值enabled-enabled记录组件的值mode-mode记录组件的值name-name记录组件的值version-version记录组件的值type-type记录组件的值instructions-instructions记录组件的值requestTimeout-requestTimeout记录组件的值capabilities-capabilities记录组件的值changeNotification-changeNotification记录组件的值sse-sse记录组件的值streamable-streamable记录组件的值
-
-
方法详细资料
-
builder
Creates a new instance ofBuilderto buildMcpServerConfiguration.- 返回:
- A new instance of
Builder.
-
getDefault
Returns the default configuration of the MCP server.By default, the enabled status is
true, the server mode isServerMode.STREAMABLE, the server name is "mcp-server", the server version is "1.0.0", the server type isServerType.SYNC, the server instructions isStringHelper.EMPTY, the request timeout is 20000 milliseconds, the capabilities isMcpServerCapabilities.getDefault(), the change notification isMcpServerChangeNotification.getDefault(), the SSE isMcpServerSSE.getDefault(), and the streamable isMcpServerStreamable.getDefault().- 返回:
- The default configuration of the MCP server.
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
profile
返回profile记录组件的值。- 返回:
profile记录组件的值
-
enabled
返回enabled记录组件的值。- 返回:
enabled记录组件的值
-
mode
返回mode记录组件的值。- 返回:
mode记录组件的值
-
name
返回name记录组件的值。- 返回:
name记录组件的值
-
version
返回version记录组件的值。- 返回:
version记录组件的值
-
type
返回type记录组件的值。- 返回:
type记录组件的值
-
instructions
返回instructions记录组件的值。- 返回:
instructions记录组件的值
-
requestTimeout
返回requestTimeout记录组件的值。- 返回:
requestTimeout记录组件的值
-
capabilities
返回capabilities记录组件的值。- 返回:
capabilities记录组件的值
-
changeNotification
返回changeNotification记录组件的值。- 返回:
changeNotification记录组件的值
-
sse
返回sse记录组件的值。- 返回:
sse记录组件的值
-
streamable
返回streamable记录组件的值。- 返回:
streamable记录组件的值
-