Class AbstractMcpPromptMethodCallback.AbstractBuilder<B extends AbstractMcpPromptMethodCallback.AbstractBuilder<B,T>,T extends AbstractMcpPromptMethodCallback>

java.lang.Object
org.springaicommunity.mcp.method.prompt.AbstractMcpPromptMethodCallback.AbstractBuilder<B,T>
Type Parameters:
B - The builder type
T - The callback type
Direct Known Subclasses:
AsyncMcpPromptMethodCallback.Builder, AsyncStatelessMcpPromptMethodCallback.Builder, SyncMcpPromptMethodCallback.Builder, SyncStatelessMcpPromptMethodCallback.Builder
Enclosing class:
AbstractMcpPromptMethodCallback

protected abstract static class AbstractMcpPromptMethodCallback.AbstractBuilder<B extends AbstractMcpPromptMethodCallback.AbstractBuilder<B,T>,T extends AbstractMcpPromptMethodCallback> extends Object
Abstract builder for creating prompt method callback instances.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Object
     
    protected Method
     
    protected io.modelcontextprotocol.spec.McpSchema.Prompt
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bean(Object bean)
    Set the bean instance that contains the method.
    abstract T
    Build the callback.
    method(Method method)
    Set the method to create a callback for.
    prompt(io.modelcontextprotocol.spec.McpSchema.Prompt prompt)
    Set the prompt.
    protected void
    Validate the builder state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • method

      protected Method method
    • bean

      protected Object bean
    • prompt

      protected io.modelcontextprotocol.spec.McpSchema.Prompt prompt
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder()
  • Method Details

    • method

      public B method(Method method)
      Set the method to create a callback for.
      Parameters:
      method - The method to create a callback for
      Returns:
      This builder
    • bean

      public B bean(Object bean)
      Set the bean instance that contains the method.
      Parameters:
      bean - The bean instance
      Returns:
      This builder
    • prompt

      public B prompt(io.modelcontextprotocol.spec.McpSchema.Prompt prompt)
      Set the prompt.
      Parameters:
      prompt - The prompt
      Returns:
      This builder
    • validate

      protected void validate()
      Validate the builder state.
      Throws:
      IllegalArgumentException - if the builder state is invalid
    • build

      public abstract T build()
      Build the callback.
      Returns:
      A new callback instance