Class RequestParams<T extends RequestParams<T>>

java.lang.Object
org.apache.juneau.bean.mcp.v20260728.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

public abstract class RequestParams<T extends RequestParams<T>> extends Object
CRTP base for MCP 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 Details

  • Method Details

    • getMeta

      @BeanProp("_meta") public RequestMeta getMeta()
      Per-request negotiation, extension, and trace-context metadata.
      Returns:
      The metadata, or null if not set.
    • setMeta

      @BeanProp("_meta") public T setMeta(RequestMeta value)
      Sets the per-request metadata.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).