Interface ResourceInvocationGate.ResourceHandler

Enclosing class:
ResourceInvocationGate
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ResourceInvocationGate.ResourceHandler
Callback executed after ResourceInvocationGate has resolved the token profile and confirmed that the policy id is enabled.
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.ReadResourceResult>
    read(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, io.modelcontextprotocol.spec.McpSchema.ReadResourceRequest request, ToolAccessConfig cfg, JavaPlugin mcpPlugin, ServerFilePaths paths)
    Produces the MCP read result for an authorized request.
  • Method Details

    • read

      reactor.core.publisher.Mono<io.modelcontextprotocol.spec.McpSchema.ReadResourceResult> read(io.modelcontextprotocol.server.McpAsyncServerExchange exchange, io.modelcontextprotocol.spec.McpSchema.ReadResourceRequest request, ToolAccessConfig cfg, JavaPlugin mcpPlugin, ServerFilePaths paths)
      Produces the MCP read result for an authorized request.
      Parameters:
      exchange - active MCP server exchange
      request - client read request including the resolved URI
      cfg - policy for policyToolId on this profile
      mcpPlugin - MCP plugin instance
      paths - resolved server file paths
      Returns:
      asynchronous read result (often JSON McpSchema.TextResourceContents)