Class AsyncMcpResourceProvider
java.lang.Object
org.springaicommunity.mcp.provider.resource.AsyncMcpResourceProvider
Provider for asynchronous MCP resource methods.
This provider creates resource specifications for methods annotated with
McpResource that are designed to work with McpAsyncServerExchange and
return reactive types.- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncMcpResourceProvider(List<Object> resourceObjects) Create a new AsyncMcpResourceProvider. -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) protected McpResourcedoGetMcpResourceAnnotation(Method method) List<io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification>Get the async resource specifications.List<io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceTemplateSpecification>
-
Constructor Details
-
AsyncMcpResourceProvider
Create a new AsyncMcpResourceProvider.- Parameters:
resourceObjects- the objects containing methods annotated withMcpResource
-
-
Method Details
-
getResourceSpecifications
public List<io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceSpecification> getResourceSpecifications()Get the async resource specifications.- Returns:
- the list of async resource specifications
-
getResourceTemplateSpecifications
public List<io.modelcontextprotocol.server.McpServerFeatures.AsyncResourceTemplateSpecification> getResourceTemplateSpecifications() -
doGetClassMethods
-
doGetMcpResourceAnnotation
-