Record Class InitializeResponse
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.server.domain.InitializeResponse
- Record Components:
protocolVersion- the negotiated protocol version stringcapabilities- the server's capabilitiesserverIdentity- server identity metadatainstructions- optional server-level instructions for the clientnegotiatedExtensions- extension-specific negotiated data
public record InitializeResponse(String protocolVersion, ServerCapabilities capabilities, ServerIdentity serverIdentity, @Nullable String instructions, @Nullable Map<String,JsonObject> negotiatedExtensions)
extends Record
Server response to the
initialize request.-
Constructor Summary
ConstructorsConstructorDescriptionInitializeResponse(String protocolVersion, ServerCapabilities capabilities, ServerIdentity serverIdentity, @Nullable String instructions, @Nullable Map<String, JsonObject> negotiatedExtensions) Creates an instance of aInitializeResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theinstructionsrecord component.@Nullable Map<String, JsonObject> Returns the value of thenegotiatedExtensionsrecord component.Returns the value of theprotocolVersionrecord component.Returns the value of theserverIdentityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InitializeResponse
public InitializeResponse(String protocolVersion, ServerCapabilities capabilities, ServerIdentity serverIdentity, @Nullable String instructions, @Nullable Map<String, JsonObject> negotiatedExtensions) Creates an instance of aInitializeResponserecord class.- Parameters:
protocolVersion- the value for theprotocolVersionrecord componentcapabilities- the value for thecapabilitiesrecord componentserverIdentity- the value for theserverIdentityrecord componentinstructions- the value for theinstructionsrecord componentnegotiatedExtensions- the value for thenegotiatedExtensionsrecord component
-
-
Method Details
-
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). -
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
serverIdentity
Returns the value of theserverIdentityrecord component.- Returns:
- the value of the
serverIdentityrecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
negotiatedExtensions
Returns the value of thenegotiatedExtensionsrecord component.- Returns:
- the value of the
negotiatedExtensionsrecord component
-