Record Class McpServerConfiguration
java.lang.Object
java.lang.Record
com.github.thought2code.mcp.annotated.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.
- Author:
- codeboyzhou
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class forMcpServerConfiguration. -
Constructor Summary
ConstructorsConstructorDescriptionMcpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable) Creates an instance of aMcpServerConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new instance ofBuilderto buildMcpServerConfiguration.Returns the value of thecapabilitiesrecord component.Returns the value of thechangeNotificationrecord component.enabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstructionsrecord component.mode()Returns the value of themoderecord component.name()Returns the value of thenamerecord component.profile()Returns the value of theprofilerecord component.Returns the value of therequestTimeoutrecord component.sse()Returns the value of thesserecord component.Returns the value of thestreamablerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
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) Creates an instance of aMcpServerConfigurationrecord class.- Parameters:
profile- the value for theprofilerecord componentenabled- the value for theenabledrecord componentmode- the value for themoderecord componentname- the value for thenamerecord componentversion- the value for theversionrecord componenttype- the value for thetyperecord componentinstructions- the value for theinstructionsrecord componentrequestTimeout- the value for therequestTimeoutrecord componentcapabilities- the value for thecapabilitiesrecord componentchangeNotification- the value for thechangeNotificationrecord componentsse- the value for thesserecord componentstreamable- the value for thestreamablerecord component
-
-
Method Details
-
builder
Creates a new instance ofBuilderto buildMcpServerConfiguration.- Returns:
- A new instance of
Builder.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
profile
Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-
enabled
Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
requestTimeout
Returns the value of therequestTimeoutrecord component.- Returns:
- the value of the
requestTimeoutrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
changeNotification
Returns the value of thechangeNotificationrecord component.- Returns:
- the value of the
changeNotificationrecord component
-
sse
Returns the value of thesserecord component.- Returns:
- the value of the
sserecord component
-
streamable
Returns the value of thestreamablerecord component.- Returns:
- the value of the
streamablerecord component
-