类 AbstractMcpServerComponent<T>

java.lang.Object
com.github.codeboyzhou.mcp.declarative.server.component.AbstractMcpServerComponent<T>
类型参数:
T - the type of the component
所有已实现的接口:
McpServerComponent<T>
直接已知子类:
McpServerPrompt, McpServerResource, McpServerTool

public abstract class AbstractMcpServerComponent<T> extends Object implements McpServerComponent<T>
This abstract class represents an MCP server component (resource/prompt/tool) that is responsible for creating instances of a specific type T for a given method, and provides common functionality for all MCP server components.
作者:
codeboyzhou
  • 字段详细资料

    • NOT_SPECIFIED

      protected static final String NOT_SPECIFIED
      The default value to use when a component attribute is not specified.
      另请参阅:
    • injector

      protected final DependencyInjector injector
      The dependency injector to use for injecting component attributes.
  • 构造器详细资料

    • AbstractMcpServerComponent

      protected AbstractMcpServerComponent()
      Creates a new instance of AbstractMcpServerComponent.
  • 方法详细资料

    • resolveComponentAttributeValue

      protected String resolveComponentAttributeValue(String attributeLiteralValue)
      Resolves the value of a component attribute, using the resource bundle for localization if i18n is enabled.
      参数:
      attributeLiteralValue - the literal value of the component attribute
      返回:
      the resolved value of the component attribute