Package io.quarkiverse.mcp.server
Interface ResourceContents
- All Known Implementing Classes:
BlobResourceContents,TextResourceContents
Represents text/binary data of a resource.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription_meta()default BlobResourceContentsasBlob()Casts and returns this object as binary resource contents, or throws anIllegalArgumentExceptionif the content object does not represent aBlobResourceContents.default TextResourceContentsasText()Casts and returns this object as text resource contents, or throws anIllegalArgumentExceptionif the content object does not represent aTextResourceContents.type()
-
Method Details
-
type
ResourceContents.Type type()- Returns:
- the type of the resource
-
_meta
- Returns:
- the optional metadata
-
asText
Casts and returns this object as text resource contents, or throws anIllegalArgumentExceptionif the content object does not represent aTextResourceContents.- Returns:
- the text content
-
asBlob
Casts and returns this object as binary resource contents, or throws anIllegalArgumentExceptionif the content object does not represent aBlobResourceContents.- Returns:
- the binary content
-