Package io.quarkiverse.mcp.server
Interface ResourceManager
- All Superinterfaces:
FeatureManager<ResourceManager.ResourceInfo>,Iterable<ResourceManager.ResourceInfo>
- All Known Implementing Classes:
ResourceManagerImpl
This manager can be used to obtain metadata and register a new resource programmatically.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceResourceManager.ResourceInfodefinition.static interfaceResource info.Nested classes/interfaces inherited from interface io.quarkiverse.mcp.server.FeatureManager
FeatureManager.FeatureArguments, FeatureManager.FeatureDefinition<INFO extends FeatureManager.FeatureInfo,ARGUMENTS extends FeatureManager.FeatureArguments, RESPONSE, THIS extends FeatureManager.FeatureDefinition<INFO, ARGUMENTS, RESPONSE, THIS>>, FeatureManager.FeatureInfo, FeatureManager.RequestFeatureArguments -
Method Summary
Modifier and TypeMethodDescriptiongetResource(String uri) newResource(String name) removeResource(String uri) Removes a resource previously added withnewResource(String).Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getResource
- Parameters:
uri-- Returns:
- the resource with the given URI or
null
-
newResource
- Parameters:
name- The name must be unique- Returns:
- a new definition builder
- Throws:
IllegalArgumentException- if a resource with the given name already exits- See Also:
-
removeResource
Removes a resource previously added withnewResource(String).- Returns:
- the removed resource or
nullif no such resource existed
-