Class McpResourcePage
java.lang.Object
com.soklet.McpResourcePage
- All Implemented Interfaces:
McpOperationResult
One immutable complete
resources/list page.
The endpoint's resources-list cache policy owns the fixed cache scope and
default time to live. A page may override only the time to live. The page is
returned directly and does not require a McpCompleteResult wrapper.
A localization-enabled server conservatively publishes a private,
zero-time-to-live policy regardless of a page override.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMutable builder for an immutable resource page. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull McpResourcePage.Builderbuilder()booleanReturns this page's time-to-live override.Returns the opaque cursor clients should supply for the next page.inthashCode()
-
Method Details
-
builder
- Returns:
- an empty resource-page builder
-
getResourceDescriptors
- Returns:
- immutable resource descriptors in insertion order
-
getMetadata
- Returns:
- immutable result-level protocol extension metadata
-
getNextCursor
Returns the opaque cursor clients should supply for the next page.The application is responsible for binding a cursor to the intended page position, retained snapshot and catalog revision, authorization context, and expiry as required by its deployment. Soklet does not sign, encrypt, store, or verify the cursor.
- Returns:
- next cursor, or empty when this is the final page
-
getCacheTimeToLiveOverride
Returns this page's time-to-live override.- Returns:
- override, or empty to use the endpoint default
-
equals
-
hashCode
-