Package org.mcpjava.server.resources
Interface ResourceResponse.Builder
- All Superinterfaces:
MetaCarrier.Builder<ResourceResponse.Builder>
- Enclosing interface:
ResourceResponse
public static interface ResourceResponse.Builder
extends MetaCarrier.Builder<ResourceResponse.Builder>
Builder for creating resource read responses.
-
Method Summary
Modifier and TypeMethodDescriptionaddContents(ResourceContents contents) Add a content object to the response.build()Builds the resource read responseMethods inherited from interface org.mcpjava.server.MetaCarrier.Builder
putMetadata, setMetadata
-
Method Details
-
addContents
Add a content object to the response. Usually a response will contain a single content object.- Parameters:
contents- the content object- Returns:
- this builder
-
build
ResourceResponse build()Builds the resource read response- Returns:
- the new resource read response
-