Record Class SyncCompletionRegistration
java.lang.Object
java.lang.Record
org.springframework.ai.mcp.modern.SyncCompletionRegistration
- Record Components:
reference- the prompt or resource reference the handler completeshandler- the handler invoked forcompletion/complete
public record SyncCompletionRegistration(io.modelcontextprotocol.modern.McpSchema.CompleteReference reference, SyncCompletionRegistration.Handler handler)
extends Record
A completion provider exposed on a 2026-07-28 server: the prompt or resource reference
it completes and the handler that serves
completion/complete.- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceServes acompletion/completerequest. -
Constructor Summary
ConstructorsConstructorDescriptionSyncCompletionRegistration(io.modelcontextprotocol.modern.McpSchema.CompleteReference reference, SyncCompletionRegistration.Handler handler) Creates an instance of aSyncCompletionRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.io.modelcontextprotocol.modern.McpSchema.CompleteReferenceReturns the value of thereferencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyncCompletionRegistration
public SyncCompletionRegistration(io.modelcontextprotocol.modern.McpSchema.CompleteReference reference, SyncCompletionRegistration.Handler handler) Creates an instance of aSyncCompletionRegistrationrecord class.
-
-
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). -
reference
public io.modelcontextprotocol.modern.McpSchema.CompleteReference reference()Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-
handler
Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-