Class AbstractMcpPromptListChangedMethodCallback.AbstractBuilder<T extends AbstractMcpPromptListChangedMethodCallback.AbstractBuilder<T,R>,R>

java.lang.Object
org.springaicommunity.mcp.method.changed.prompt.AbstractMcpPromptListChangedMethodCallback.AbstractBuilder<T,R>
Type Parameters:
T - The type of the builder
R - The type of the callback
Direct Known Subclasses:
AsyncMcpPromptListChangedMethodCallback.Builder, SyncMcpPromptListChangedMethodCallback.Builder
Enclosing class:
AbstractMcpPromptListChangedMethodCallback

protected abstract static class AbstractMcpPromptListChangedMethodCallback.AbstractBuilder<T extends AbstractMcpPromptListChangedMethodCallback.AbstractBuilder<T,R>,R> extends Object
Abstract builder for creating McpPromptListChangedMethodCallback instances.

This builder provides a base for constructing callback instances with the required parameters.

  • Field Details

    • method

      protected Method method
    • bean

      protected Object bean
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder()
  • Method Details

    • method

      public T 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 T bean(Object bean)
      Set the bean instance that contains the method.
      Parameters:
      bean - The bean instance
      Returns:
      This builder
    • promptListChanged

      public T promptListChanged(McpPromptListChanged promptListChanged)
      Set the prompt list changed annotation.
      Parameters:
      promptListChanged - The prompt list changed annotation
      Returns:
      This builder
    • validate

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

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