Package org.mcpjava.server.content
Interface ResourceLink.Builder
- All Superinterfaces:
MetaCarrier.Builder<ResourceLink.Builder>
- Enclosing interface:
ResourceLink
A builder for creating resource link contents
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the resource link contentsetAnnotations(Annotations annotations) Sets the annotations for the contentsetDescription(String description) Sets the description of this resourcesetMimeType(String mimeType) Sets the MIME type of this resource, if knownsetSize(long size) Sets the size of the resource contentSets the human-friendly name for this resourceMethods inherited from interface org.mcpjava.server.MetaCarrier.Builder
putMetadata, setMetadata
-
Method Details
-
setTitle
Sets the human-friendly name for this resource- Parameters:
title- the human-friendly name- Returns:
- this builder
-
setDescription
Sets the description of this resource- Parameters:
description- the description- Returns:
- this builder
-
setMimeType
Sets the MIME type of this resource, if known- Parameters:
mimeType- the MIME type- Returns:
- this builder
-
setAnnotations
Sets the annotations for the content- Parameters:
annotations- the annotations- Returns:
- this builder
-
setSize
Sets the size of the resource content- Parameters:
size- the size in bytes- Returns:
- this builder
-
build
ResourceLink build()Builds the resource link content- Returns:
- the new resource link content
-