Record Class InitializeResult
java.lang.Object
java.lang.Record
com.shaft.commandline.mcp.InitializeResult
- Record Components:
serverName- the server identity, expected to beshaft-mcpserverVersion- the server version stringprotocolVersion- the negotiated MCP protocol version, e.g.2025-03-26
-
Constructor Summary
ConstructorsConstructorDescriptionInitializeResult(String serverName, String serverVersion, String protocolVersion) Creates an instance of aInitializeResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprotocolVersionrecord component.Returns the value of theserverNamerecord component.Returns the value of theserverVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InitializeResult
Creates an instance of aInitializeResultrecord class.- Parameters:
serverName- the value for theserverNamerecord componentserverVersion- the value for theserverVersionrecord componentprotocolVersion- the value for theprotocolVersionrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
serverName
Returns the value of theserverNamerecord component.- Returns:
- the value of the
serverNamerecord component
-
serverVersion
Returns the value of theserverVersionrecord component.- Returns:
- the value of the
serverVersionrecord component
-
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-