Class RequestParams<T extends RequestParams<T>>
- Type Parameters:
T- The concrete subclass, for fluent-setter self-typing.
- Direct Known Subclasses:
CallToolRequest,CompleteRequest,GetPromptRequest,PromptsListChangedNotification,ReadResourceRequest,RequestParamsOnly,ResourcesListChangedNotification,ResourceUpdatedNotification,SubscriptionsAcknowledgedNotification,SubscriptionsListenRequest,ToolsListChangedNotification
2026-07-28 request params carrying optional negotiation/trace metadata under the
reserved _meta wire key.
Per the 2026-07-28 schema, every v2 request places its metadata under params._meta rather than
beside the JSON-RPC envelope. The four concrete params beans (CallToolRequest, GetPromptRequest,
ReadResourceRequest, and CompleteRequest) extend this base without gaining any wire-visible
members beyond their own existing payload fields plus the inherited _meta. RequestParamsOnly is
the concrete carrier for methods (list/ping/discovery) whose only common params member is _meta.
This base is a lossless wire carrier only: it performs no negotiation validation. Metadata shape and negotiation
rules are owned by RequestMeta and the 2026-07-28 adapter's dispatch validation.
The CRTP type parameter lets each concrete subclass's setMeta(RequestMeta) return its own concrete type
for fluent chaining, without duplicating the _meta accessor in every subclass.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMeta()Per-request negotiation, extension, and trace-context metadata.setMeta(RequestMeta value) Sets the per-request metadata.
-
Constructor Details
-
RequestParams
public RequestParams()
-
-
Method Details
-
getMeta
Per-request negotiation, extension, and trace-context metadata.- Returns:
- The metadata, or
nullif not set.
-
setMeta
Sets the per-request metadata.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-