Class McpLocalizer.Builder
java.lang.Object
com.soklet.McpLocalizer.Builder
- Enclosing class:
McpLocalizer
Single-threaded builder for an immutable localizer.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()failurePolicy(@Nullable McpLocalizationFailurePolicy failurePolicy) Sets the whole-response behavior for unexpected framework-catalog provider or replacement validation failure.maximumLocalizableTextCountPerResponse(@Nullable Integer maximumLocalizableTextCountPerResponse) Sets the maximum provider lookup count for one framework response.
-
Method Details
-
failurePolicy
public @NonNull McpLocalizer.Builder failurePolicy(@Nullable McpLocalizationFailurePolicy failurePolicy) Sets the whole-response behavior for unexpected framework-catalog provider or replacement validation failure. The default uses canonical fallback text. Application context-creation failure remains a sanitized failure before handler/interceptor entry under either policy.- Parameters:
failurePolicy- failure policy, or null to restore the default- Returns:
- this builder
-
maximumLocalizableTextCountPerResponse
public @NonNull McpLocalizer.Builder maximumLocalizableTextCountPerResponse(@Nullable Integer maximumLocalizableTextCountPerResponse) Sets the maximum provider lookup count for one framework response. The default is 32,768 and the supported range is 1 through 100,000.- Parameters:
maximumLocalizableTextCountPerResponse- positive bounded limit, or null to restore the default- Returns:
- this builder
- Throws:
IllegalArgumentException- if the value is outside the supported range
-
build
- Returns:
- immutable server localizer
-