Interface McpLocalizationContextProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Thread-safe application provider of request-local MCP localization contexts.
Soklet may call one provider concurrently for independent admitted requests. The provider is application-owned and is never closed by Soklet. Context creation runs under the operation's existing bounded execution owner: application operations consume their acquired handler slot, while framework catalogs and subscriptions consume bounded protocol ownership. Creation therefore must use already-loaded, in-memory state rather than remote translation lookup.
Soklet exposes the exact returned context to application handlers and interceptors. Soklet's no-leak guarantee applies when Soklet invokes this callback. Direct application invocation remains application-owned and has normal application failure semantics.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionprovideContext(@NonNull McpLocalizationRequest localizationRequest) Provides the immutable localization context for one admitted localization-capable operation.
-
Method Details
-
provideContext
@NonNull McpLocalizationContext provideContext(@NonNull McpLocalizationRequest localizationRequest) throws Exception Provides the immutable localization context for one admitted localization-capable operation.- Parameters:
localizationRequest- bounded localization inputs and admitted request context- Returns:
- non-null request-local context
- Throws:
Exception- if context creation fails; when Soklet invokes this callback it treats the exception as untrusted localization data and never forwards it through framework-owned lifecycle, simulation, logging, response-throwable, or cause surfaces
-