Class AbstractMcpCompleteMethodCallback.AbstractBuilder<T extends AbstractMcpCompleteMethodCallback.AbstractBuilder<T,R>,R>
java.lang.Object
org.springaicommunity.mcp.method.complete.AbstractMcpCompleteMethodCallback.AbstractBuilder<T,R>
- Type Parameters:
T- The type of the builderR- The type of the callback
- Direct Known Subclasses:
AsyncMcpCompleteMethodCallback.Builder,AsyncStatelessMcpCompleteMethodCallback.Builder,SyncMcpCompleteMethodCallback.Builder,SyncStatelessMcpCompleteMethodCallback.Builder
- Enclosing class:
- AbstractMcpCompleteMethodCallback
protected abstract static class AbstractMcpCompleteMethodCallback.AbstractBuilder<T extends AbstractMcpCompleteMethodCallback.AbstractBuilder<T,R>,R>
extends Object
Abstract builder for creating McpCompleteMethodCallback instances.
This builder provides a base for constructing callback instances with the required parameters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the bean instance that contains the method.abstract Rbuild()Build the callback.complete(McpComplete complete) Set the complete annotation.Set the method to create a callback for.Set the prompt reference.reference(io.modelcontextprotocol.spec.McpSchema.CompleteReference completeReference) Set the complete reference.Set the URI reference.uriTemplateManagerFactory(io.modelcontextprotocol.util.McpUriTemplateManagerFactory uriTemplateManagerFactory) Set the URI template manager factory.protected voidvalidate()Validate the builder state.
-
Field Details
-
method
-
bean
-
uriTemplateManagerFactory
protected io.modelcontextprotocol.util.McpUriTemplateManagerFactory uriTemplateManagerFactory -
prompt
-
uri
-
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
method
Set the method to create a callback for.- Parameters:
method- The method to create a callback for- Returns:
- This builder
-
bean
Set the bean instance that contains the method.- Parameters:
bean- The bean instance- Returns:
- This builder
-
prompt
Set the prompt reference.- Parameters:
prompt- The prompt reference- Returns:
- This builder
-
uri
Set the URI reference.- Parameters:
uri- The URI reference- Returns:
- This builder
-
reference
Set the complete reference.- Parameters:
completeReference- The complete reference- Returns:
- This builder
-
complete
Set the complete annotation.- Parameters:
complete- The complete annotation- Returns:
- This builder
-
uriTemplateManagerFactory
public T uriTemplateManagerFactory(io.modelcontextprotocol.util.McpUriTemplateManagerFactory uriTemplateManagerFactory) Set the URI template manager factory.- Parameters:
uriTemplateManagerFactory- The URI template manager factory- Returns:
- This builder
-
validate
protected void validate()Validate the builder state.- Throws:
IllegalArgumentException- if the builder state is invalid
-
build
Build the callback.- Returns:
- A new callback instance
-