Class NuggetAdminRuntimeConfiguration.Builder
- Enclosing class:
NuggetAdminRuntimeConfiguration
NuggetAdminRuntimeConfiguration.-
Method Summary
Modifier and TypeMethodDescriptionapplicationDeployer(org.j7m.middleware.deployer.api.ApplicationDeployer value) Sets the public deployer authority used by nugget application lifecycle operations.build()Builds an immutable runtime configuration.Sets the wall clock for deterministic tests and audit timestamps.confirmationPolicy(Duration ttl, int maxRetained) Sets bounded confirmation challenge retention for nugget controls.controlExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded execution policy for nugget-level control operations.discoveryTarget(org.j7m.middleware.operations.api.NuggetDiscovery.ConfiguredTarget target) Adds an explicit configured discovery target.discoveryTiming(Duration ttl, Duration heartbeat) Sets local discovery lease and heartbeat timing.enabled(boolean value) Sets whether nugget administration is enabled.generatedDevelopmentPin(Consumer<char[]> receiver) Requests an explicit generated development PIN in unsafe developer mode.introspectionProvider(org.j7m.middleware.operations.api.NuggetIntrospection.Provider value) Adds one trusted bounded provider for read-only introspection.iterations(int value) Sets the PBKDF2 iteration count.killEnabled(boolean value) Enables or disables explicitly gated nugget self-termination.localDiscovery(Path directory, boolean enabled) Enables or disables protected local nugget discovery publication.maxDiscoveryRecords(int value) Sets the maximum local discovery records scanned per discovery call.maxPinBytes(int value) Sets the maximum accepted UTF-8 encoded PIN length.monotonicTimeSource(LongSupplier value) Sets the monotonic time source for throttle calculations.nuggetName(String value) Sets the human-readable nugget name.pinFromDirectProcessArgument(char[] pin) Adds a lower-safety direct process argument PIN source.pinFromEnvironment(String variableName) Adds a configured environment variable PIN source.pinFromEnvironment(String variableName, Function<String, String> lookup) Adds a configured environment variable PIN source with injectable lookup.pinFromInteractiveBootstrap(org.j7m.middleware.operations.api.NuggetPinSecretProvider provider) Adds an explicit interactive bootstrap source supplied by the embedding runtime.pinFromProgrammaticProvider(String description, org.j7m.middleware.operations.api.NuggetPinSecretProvider provider) Adds a protected programmatic PIN source.pinFromProtectedFile(Path path) Adds a protected PIN file source.Adds a protected verifier file source.providerExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded provider execution policy for read-only introspection.providerExecutionPolicy(int concurrency, Duration timeout) Sets bounded provider execution policy for read-only introspection.readOnly(boolean value) Enables or disables read-only administration mode.runtimeCloseAction(Runnable value) Sets the authoritative runtime close action used for graceful nugget shutdown.secureRandom(SecureRandom value) Sets the secure random source for salts and explicit development PINs.security(org.j7m.middleware.security.api.SecurityConfiguration value) Sets the existing runtime security configuration.startApplicationEnabled(boolean value) Enables or disables repository-coordinate start operations.storageRoot(String role, Path path, boolean sensitive) Adds a configured storage root for disk introspection.terminationCapability(Runnable value) Sets an injected self-termination capability for explicitly enabled forced nugget termination.throttlePolicy(int maxBuckets, Duration window, Duration maxDelay) Sets throttle policy limits.unsafeDeveloperMode(boolean value) Enables or disables explicit unsafe developer mode.
-
Method Details
-
enabled
Sets whether nugget administration is enabled.- Parameters:
value- enabled flag- Returns:
- this builder
-
nuggetName
Sets the human-readable nugget name.- Parameters:
value- nugget name- Returns:
- this builder
-
unsafeDeveloperMode
Enables or disables explicit unsafe developer mode.- Parameters:
value- unsafe developer flag- Returns:
- this builder
-
security
public NuggetAdminRuntimeConfiguration.Builder security(org.j7m.middleware.security.api.SecurityConfiguration value) Sets the existing runtime security configuration.- Parameters:
value- security configuration- Returns:
- this builder
-
clock
Sets the wall clock for deterministic tests and audit timestamps.- Parameters:
value- wall clock- Returns:
- this builder
-
monotonicTimeSource
Sets the monotonic time source for throttle calculations.- Parameters:
value- monotonic nanosecond source- Returns:
- this builder
-
secureRandom
Sets the secure random source for salts and explicit development PINs.- Parameters:
value- secure random source- Returns:
- this builder
-
iterations
Sets the PBKDF2 iteration count.- Parameters:
value- iteration count within the Phase 7.1 verifier policy- Returns:
- this builder
-
maxPinBytes
Sets the maximum accepted UTF-8 encoded PIN length.- Parameters:
value- maximum byte length- Returns:
- this builder
-
throttlePolicy
public NuggetAdminRuntimeConfiguration.Builder throttlePolicy(int maxBuckets, Duration window, Duration maxDelay) Sets throttle policy limits.- Parameters:
maxBuckets- maximum retained throttle bucketswindow- failure windowmaxDelay- maximum retry delay- Returns:
- this builder
-
pinFromProgrammaticProvider
public NuggetAdminRuntimeConfiguration.Builder pinFromProgrammaticProvider(String description, org.j7m.middleware.operations.api.NuggetPinSecretProvider provider) Adds a protected programmatic PIN source.- Parameters:
description- safe source descriptionprovider- protected provider- Returns:
- this builder
-
pinFromEnvironment
Adds a configured environment variable PIN source.- Parameters:
variableName- environment variable name- Returns:
- this builder
-
pinFromEnvironment
public NuggetAdminRuntimeConfiguration.Builder pinFromEnvironment(String variableName, Function<String, String> lookup) Adds a configured environment variable PIN source with injectable lookup.- Parameters:
variableName- environment variable namelookup- environment lookup- Returns:
- this builder
-
pinFromProtectedFile
Adds a protected PIN file source.- Parameters:
path- configured file path- Returns:
- this builder
-
pinFromDirectProcessArgument
Adds a lower-safety direct process argument PIN source.- Parameters:
pin- PIN characters copied into the configuration source- Returns:
- this builder
-
pinFromInteractiveBootstrap
public NuggetAdminRuntimeConfiguration.Builder pinFromInteractiveBootstrap(org.j7m.middleware.operations.api.NuggetPinSecretProvider provider) Adds an explicit interactive bootstrap source supplied by the embedding runtime.- Parameters:
provider- terminal-safe prompt provider- Returns:
- this builder
-
pinFromProtectedVerifierFile
Adds a protected verifier file source.- Parameters:
path- verifier record path- Returns:
- this builder
-
generatedDevelopmentPin
Requests an explicit generated development PIN in unsafe developer mode.- Parameters:
receiver- local developer channel receiving a copied PIN- Returns:
- this builder
-
introspectionProvider
public NuggetAdminRuntimeConfiguration.Builder introspectionProvider(org.j7m.middleware.operations.api.NuggetIntrospection.Provider value) Adds one trusted bounded provider for read-only introspection.The provider is invoked by the nugget admin runtime through an internally bounded executor with provider deadlines. Returned values are still projected, authorized, redacted, filtered, sorted, and paged by the runtime before public DTO construction.
- Parameters:
value- typed read-only provider- Returns:
- this builder
-
applicationDeployer
public NuggetAdminRuntimeConfiguration.Builder applicationDeployer(org.j7m.middleware.deployer.api.ApplicationDeployer value) Sets the public deployer authority used by nugget application lifecycle operations.The runtime depends only on
ApplicationDeployer; it does not depend on the application-platform implementation module. A missing deployer returns truthful unavailable lifecycle results.- Parameters:
value- deployer authority, ornull- Returns:
- this builder
-
readOnly
Enables or disables read-only administration mode.- Parameters:
value- read-only flag- Returns:
- this builder
-
startApplicationEnabled
Enables or disables repository-coordinate start operations.- Parameters:
value- start-enabled flag- Returns:
- this builder
-
killEnabled
Enables or disables explicitly gated nugget self-termination.The default is disabled. Enabling this flag does not install a termination primitive and does not bypass PIN admission, authorization, exact target validation, confirmation, deadlines, or audit.
- Parameters:
value- kill-enabled flag- Returns:
- this builder
-
controlExecutionPolicy
public NuggetAdminRuntimeConfiguration.Builder controlExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded execution policy for nugget-level control operations.- Parameters:
concurrency- maximum concurrent control calls, currently only1queueCapacity- maximum queued control calls, currently0through4timeout- positive control deadline, at most 30 secondsshutdownWait- positive control-executor shutdown wait, at most 10 seconds- Returns:
- this builder
- Throws:
IllegalArgumentException- when a value is outside policy
-
confirmationPolicy
Sets bounded confirmation challenge retention for nugget controls.- Parameters:
ttl- positive confirmation time-to-live, at most five minutesmaxRetained- maximum retained live confirmation challenges- Returns:
- this builder
- Throws:
IllegalArgumentException- when a value is outside policy
-
runtimeCloseAction
Sets the authoritative runtime close action used for graceful nugget shutdown.Embedders normally receive this automatically from
MiddlewareRuntimeBuilder. The callback must invoke the owning runtime close path and must not call nugget-admin close directly.- Parameters:
value- runtime close action, ornull- Returns:
- this builder
-
terminationCapability
Sets an injected self-termination capability for explicitly enabled forced nugget termination.No default capability is installed. Tests may supply a fake callback. Production embedders must not use this method for arbitrary process control, process-id selection, shell execution, or direct unbounded JVM termination.
- Parameters:
value- injected self-termination callback, ornull- Returns:
- this builder
-
providerExecutionPolicy
public NuggetAdminRuntimeConfiguration.Builder providerExecutionPolicy(int concurrency, Duration timeout) Sets bounded provider execution policy for read-only introspection.- Parameters:
concurrency- maximum concurrent provider calls, currently 1 or 2timeout- positive per-provider deadline, at most 30 seconds- Returns:
- this builder
- Throws:
IllegalArgumentException- when a value is outside the runtime policy
-
providerExecutionPolicy
public NuggetAdminRuntimeConfiguration.Builder providerExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded provider execution policy for read-only introspection.- Parameters:
concurrency- maximum concurrent provider calls, currently 1 or 2queueCapacity- maximum queued provider calls, currently 0 through 8timeout- positive per-provider deadline, at most 30 secondsshutdownWait- positive maximum shutdown wait, at most 10 seconds- Returns:
- this builder
- Throws:
IllegalArgumentException- when a value is outside the runtime policy
-
storageRoot
public NuggetAdminRuntimeConfiguration.Builder storageRoot(String role, Path path, boolean sensitive) Adds a configured storage root for disk introspection.- Parameters:
role- storage rolepath- root pathsensitive- whether path components require redaction- Returns:
- this builder
-
localDiscovery
Enables or disables protected local nugget discovery publication.The directory is validated by the runtime before publication. It is not exposed through public discovery records.
- Parameters:
directory- local J7M-owned discovery directoryenabled- enabled flag- Returns:
- this builder
-
discoveryTiming
Sets local discovery lease and heartbeat timing.- Parameters:
ttl- record time-to-liveheartbeat- heartbeat refresh interval- Returns:
- this builder
-
maxDiscoveryRecords
Sets the maximum local discovery records scanned per discovery call.- Parameters:
value- record limit- Returns:
- this builder
-
discoveryTarget
public NuggetAdminRuntimeConfiguration.Builder discoveryTarget(org.j7m.middleware.operations.api.NuggetDiscovery.ConfiguredTarget target) Adds an explicit configured discovery target.- Parameters:
target- configured target- Returns:
- this builder
-
build
Builds an immutable runtime configuration.- Returns:
- runtime configuration
-