Interface ResourceRequest
- All Superinterfaces:
HasMeta,ServerFeature.Request
Request passed to a resource function when a client invokes
resources/read.
Carries the concrete resource uri() that was read, optionally the
uriTemplate() that matched, and any URI-template params()
extracted during matching.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceRequest.Builderbuilder()Creates a new builder forResourceRequest.Returns the client responses supplied when retrying an input-required resource read.meta()Optional protocol extension metadata.default Map<String, UriTemplateValue> params()URI-template variable values extracted during template matching, keyed by variable name.@Nullable StringReturns the opaque request state supplied when retrying an input-required resource read.uri()The resource URI being requested.@Nullable StringThe URI template that matched the request, ornullwhen the request targets a static (non-template) resource.
-
Method Details
-
uri
String uri()The resource URI being requested. -
params
URI-template variable values extracted during template matching, keyed by variable name. Empty when the request targets a static (non-template) resource. -
uriTemplate
@Nullable String uriTemplate()The URI template that matched the request, ornullwhen the request targets a static (non-template) resource. -
meta
Optional protocol extension metadata. -
inputResponses
Returns the client responses supplied when retrying an input-required resource read.- Returns:
- input responses, or
null
-
requestState
@Nullable String requestState()Returns the opaque request state supplied when retrying an input-required resource read.- Returns:
- request state, or
null
-
builder
Creates a new builder forResourceRequest.
-