Class FeatureManagerBase<RESULT,INFO extends FeatureManager.FeatureInfo>

java.lang.Object
io.quarkiverse.mcp.server.runtime.FeatureManagerBase<RESULT,INFO>
Direct Known Subclasses:
CompletionManagerBase, NotificationManagerImpl, PromptManagerImpl, ResourceManagerImpl, ResourceTemplateManagerImpl, ToolManagerImpl

public abstract class FeatureManagerBase<RESULT,INFO extends FeatureManager.FeatureInfo> extends Object
  • Field Details

    • vertx

      protected final io.vertx.core.Vertx vertx
    • mapper

      protected final com.fasterxml.jackson.databind.ObjectMapper mapper
    • connectionManager

      protected final ConnectionManager connectionManager
    • loggers

      protected final ConcurrentMap<String,org.jboss.logging.Logger> loggers
    • currentIdentityAssociation

      protected final io.quarkus.security.identity.CurrentIdentityAssociation currentIdentityAssociation
  • Constructor Details

    • FeatureManagerBase

      protected FeatureManagerBase(io.vertx.core.Vertx vertx, com.fasterxml.jackson.databind.ObjectMapper mapper, ConnectionManager connectionManager, jakarta.enterprise.inject.Instance<io.quarkus.security.identity.CurrentIdentityAssociation> currentIdentityAssociation, ResponseHandlers responseHandlers)
  • Method Details

    • execute

      public io.vertx.core.Future<RESULT> execute(String id, io.quarkiverse.mcp.server.runtime.FeatureManagerBase.FeatureExecutionContext executionContext) throws McpException
      Throws:
      McpException
    • wrapResult

      protected Object wrapResult(Object ret, FeatureMetadata<?> metadata, io.quarkiverse.mcp.server.runtime.ArgumentProviders argProviders)
    • iterator

      public Iterator<INFO> iterator()
    • fetchPage

      public io.quarkiverse.mcp.server.runtime.Page<INFO> fetchPage(McpRequest mcpRequest, io.quarkiverse.mcp.server.runtime.Cursor cursor, int pageSize)
    • hasInfos

      public boolean hasInfos(McpRequest mcpRequest)
    • matches

      protected boolean matches(INFO info, McpRequest mcpRequest)
    • prepareArguments

      protected Object[] prepareArguments(FeatureMetadata<?> metadata, io.quarkiverse.mcp.server.runtime.ArgumentProviders argProviders) throws McpException
      Throws:
      McpException
    • getInvoker

      protected abstract io.quarkiverse.mcp.server.runtime.FeatureManagerBase.FeatureInvoker<RESULT> getInvoker(String id, McpRequest mcpRequest)
    • notFound

      protected abstract McpException notFound(String id)
    • execute

      protected io.vertx.core.Future<RESULT> execute(ExecutionModel executionModel, io.quarkiverse.mcp.server.runtime.FeatureManagerBase.FeatureExecutionContext executionContext, Callable<io.smallrye.mutiny.Uni<RESULT>> action)
    • log

      protected McpLog log(String key, String loggerName, io.quarkiverse.mcp.server.runtime.ArgumentProviders argProviders)
    • notifyConnections

      protected void notifyConnections(String method)
    • defaultValueConverters

      protected Map<Type,DefaultValueConverter<?>> defaultValueConverters()
    • convert

      protected Object convert(String value, Type type)