Package io.quarkiverse.mcp.server
Interface ResourceManager.ResourceDefinition
- All Superinterfaces:
FeatureManager.FeatureDefinition<ResourceManager.ResourceInfo,ResourceManager.ResourceArguments, ResourceResponse, ResourceManager.ResourceDefinition>
- Enclosing interface:
- ResourceManager
public static interface ResourceManager.ResourceDefinition
extends FeatureManager.FeatureDefinition<ResourceManager.ResourceInfo,ResourceManager.ResourceArguments,ResourceResponse,ResourceManager.ResourceDefinition>
ResourceManager.ResourceInfo definition.
This construct is not thread-safe and should not be reused.
-
Method Summary
Modifier and TypeMethodDescriptionregister()Registers the resulting info and sends notifications to all connected clients.setAnnotations(Content.Annotations annotations) setMimeType(String mimeType) setSize(int size) Methods inherited from interface io.quarkiverse.mcp.server.FeatureManager.FeatureDefinition
setAsyncHandler, setDescription, setHandler, setHandler, setServerName
-
Method Details
-
setTitle
- Parameters:
title-- Returns:
- self
-
setUri
- Parameters:
uri-- Returns:
- self
- Throws:
IllegalArgumentException- if a resource with the given URI already exits- See Also:
-
setMimeType
- Parameters:
mimeType-- Returns:
- self
- See Also:
-
setSize
- Parameters:
size-- Returns:
- self
- See Also:
-
setAnnotations
- Parameters:
annotations-- Returns:
- self
-
register
ResourceManager.ResourceInfo register()Description copied from interface:FeatureManager.FeatureDefinitionRegisters the resulting info and sends notifications to all connected clients.- Specified by:
registerin interfaceFeatureManager.FeatureDefinition<ResourceManager.ResourceInfo,ResourceManager.ResourceArguments, ResourceResponse, ResourceManager.ResourceDefinition> - Returns:
- the resource info
- Throws:
IllegalArgumentException- if a resource with the given name or URI already exits
-