Record Class McpServerChangeNotification
java.lang.Object
java.lang.Record
com.github.thought2code.mcp.annotated.configuration.McpServerChangeNotification
public record McpServerChangeNotification(Boolean resource, Boolean prompt, Boolean tool)
extends Record
This record represents a change notification for MCP (Model Context Protocol) server
capabilities.
It contains boolean flags indicating whether the server supports resource, prompt, and tool change notification.
- Author:
- codeboyzhou
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class forMcpServerChangeNotification. -
Constructor Summary
ConstructorsConstructorDescriptionMcpServerChangeNotification(Boolean resource, Boolean prompt, Boolean tool) Creates an instance of aMcpServerChangeNotificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new instance ofBuilderto buildMcpServerChangeNotification.final booleanIndicates whether some other object is "equal to" this one.static McpServerChangeNotificationReturns the default change notification of the MCP server.final inthashCode()Returns a hash code value for this object.prompt()Returns the value of thepromptrecord component.resource()Returns the value of theresourcerecord component.tool()Returns the value of thetoolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpServerChangeNotification
Creates an instance of aMcpServerChangeNotificationrecord class.- Parameters:
resource- the value for theresourcerecord componentprompt- the value for thepromptrecord componenttool- the value for thetoolrecord component
-
-
Method Details
-
builder
Creates a new instance ofBuilderto buildMcpServerChangeNotification.- Returns:
- A new instance of
Builder.
-
getDefault
Returns the default change notification of the MCP server.By default, all change notification flags are set to
true.- Returns:
- The default change notification of the MCP server.
-
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). -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-
tool
Returns the value of thetoolrecord component.- Returns:
- the value of the
toolrecord component
-