Record Class SyncModernProgressSpecification
java.lang.Object
java.lang.Record
org.springframework.ai.mcp.annotation.method.progress.SyncModernProgressSpecification
- Record Components:
clients- the names of the connections the handler receives the progress ofprogressHandler- the handler, which takes the modern progress. Its second argument is the tool context of the tool call that reports the progress, ornullif there is none
public record SyncModernProgressSpecification(String[] clients, BiConsumer<io.modelcontextprotocol.modern.McpSchema.ProgressParams,@Nullable ToolContext> progressHandler)
extends Record
A progress handler for the connections that speak the 2026-07-28 ("modern") MCP
revision, the counterpart of
SyncProgressSpecification.- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionSyncModernProgressSpecification(String[] clients, BiConsumer<io.modelcontextprotocol.modern.McpSchema.ProgressParams, @Nullable ToolContext> progressHandler) Creates an instance of aSyncModernProgressSpecificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionString[]clients()Returns the value of theclientsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.BiConsumer<io.modelcontextprotocol.modern.McpSchema.ProgressParams,@Nullable ToolContext> Returns the value of theprogressHandlerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyncModernProgressSpecification
public SyncModernProgressSpecification(String[] clients, BiConsumer<io.modelcontextprotocol.modern.McpSchema.ProgressParams, @Nullable ToolContext> progressHandler) Creates an instance of aSyncModernProgressSpecificationrecord class.- Parameters:
clients- the value for theclientsrecord componentprogressHandler- the value for theprogressHandlerrecord 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). -
clients
Returns the value of theclientsrecord component.- Returns:
- the value of the
clientsrecord component
-
progressHandler
public BiConsumer<io.modelcontextprotocol.modern.McpSchema.ProgressParams,@Nullable ToolContext> progressHandler()Returns the value of theprogressHandlerrecord component.- Returns:
- the value of the
progressHandlerrecord component
-