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