Class McpResourceRegistration

java.lang.Object
com.soklet.McpResourceRegistration

@ThreadSafe public final class McpResourceRegistration extends Object
Immutable programmatic registration for one MCP resource-read route.

Registration is staged so a handler must be supplied before optional descriptor metadata can be configured. Exact and template registrations intentionally expose different builders: only an exact resource may advertise a size. The registration cache policy owns the fixed scope and default time to live for reads; the default is McpCachePolicy.privateNoCacheInstance().

Registration validates address structure and routing, not deployment safety. The application owns an allowlist based on how each URI is delivered or dereferenced. Direct-client addresses and handler-only custom addresses commonly require different scheme, authority, credential, query, and fragment rules. A filesystem-backed handler additionally owns canonical root containment, symlink policy, authorization, and safe opening; Soklet does not map registered URIs to files.

Author:
Mark Allen