Class NuggetAdminConfiguration.Builder
- Enclosing class:
NuggetAdminConfiguration
NuggetAdminConfiguration.-
Method Summary
Modifier and TypeMethodDescriptionapplicationDeployer(org.j7m.middleware.deployer.api.ApplicationDeployer value) Sets the public deployer authority used for application lifecycle operations.build()Builds an immutable configuration.Sets the wall clock for deterministic tests and audit timestamps.confirmationPolicy(Duration ttl, int maxRetained) Sets bounded confirmation retention for nugget controls.controlExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded execution limits 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 a trusted typed read-only introspection provider.iterations(int value) Sets the PBKDF2 iteration count.killEnabled(boolean value) Enables or disables explicitly gated nugget self-termination.localDiscovery(Path directory, boolean value) Enables or disables local J7M-owned discovery publication.maxDiscoveryRecords(int value) Sets the maximum local discovery records scanned per operation.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 execution limits for read-only introspection providers.providerExecutionPolicy(int concurrency, Duration timeout) Sets bounded execution limits for read-only introspection providers.readOnly(boolean value) Enables or disables read-only administration mode.runtimeCloseAction(Runnable value) Sets the runtime close capability 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 application start operations.storageRoot(String role, Path path, boolean sensitive) Adds a configured storage root for disk introspection.terminationCapability(Runnable value) Sets the injected self-termination capability for forced nugget termination tests or controlled embedders.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 NuggetAdminConfiguration.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, from 210000 through 1000000- Returns:
- this builder
-
maxPinBytes
Sets the maximum accepted UTF-8 encoded PIN length.- Parameters:
value- maximum byte length- Returns:
- this builder
-
throttlePolicy
public NuggetAdminConfiguration.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
-
providerExecutionPolicy
Sets bounded execution limits for read-only introspection providers.- Parameters:
concurrency- maximum concurrent provider callstimeout- per-provider timeout- Returns:
- this builder
-
providerExecutionPolicy
public NuggetAdminConfiguration.Builder providerExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded execution limits for read-only introspection providers.- Parameters:
concurrency- maximum concurrent provider callsqueueCapacity- maximum queued provider callstimeout- per-provider timeoutshutdownWait- maximum executor shutdown wait- Returns:
- this builder
-
localDiscovery
Enables or disables local J7M-owned discovery publication.- Parameters:
directory- protected local discovery directoryvalue- 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 operation.- Parameters:
value- maximum record count- Returns:
- this builder
-
discoveryTarget
public NuggetAdminConfiguration.Builder discoveryTarget(org.j7m.middleware.operations.api.NuggetDiscovery.ConfiguredTarget target) Adds an explicit configured discovery target.- Parameters:
target- configured target- Returns:
- this builder
-
pinFromProgrammaticProvider
public NuggetAdminConfiguration.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 NuggetAdminConfiguration.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 NuggetAdminConfiguration.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 NuggetAdminConfiguration.Builder introspectionProvider(org.j7m.middleware.operations.api.NuggetIntrospection.Provider value) Adds a trusted typed read-only introspection provider.- Parameters:
value- provider to execute through bounded runtime controls- Returns:
- this builder
-
applicationDeployer
public NuggetAdminConfiguration.Builder applicationDeployer(org.j7m.middleware.deployer.api.ApplicationDeployer value) Sets the public deployer authority used for application lifecycle operations.The runtime stores only the public API contract. Supplying
nulldisables lifecycle mutation support and causes requests to return a truthful unavailable result.- Parameters:
value- application deployer, ornull- Returns:
- this builder
-
readOnly
Enables or disables read-only administration mode.Read-only mode leaves admission and inspection available but rejects lifecycle mutations before the deployer is invoked.
- Parameters:
value- read-only flag- Returns:
- this builder
-
startApplicationEnabled
Enables or disables application start operations.Stop, drain, and unload are controlled by the general read-only gate and authorization policy. This flag exists so production embedders can disable repository-coordinate activation while preserving other lifecycle controls.
- Parameters:
value- start-enabled flag- Returns:
- this builder
-
killEnabled
Enables or disables explicitly gated nugget self-termination.The default is disabled. Enabling this flag is not sufficient by itself: the caller must also supply a termination capability and each request must pass admission, authorization, exact self-target validation, confirmation, and deadline checks.
- Parameters:
value- kill-enabled flag- Returns:
- this builder
-
controlExecutionPolicy
public NuggetAdminConfiguration.Builder controlExecutionPolicy(int concurrency, int queueCapacity, Duration timeout, Duration shutdownWait) Sets bounded execution limits for nugget-level control operations.- Parameters:
concurrency- maximum concurrent control calls, currently only1queueCapacity- maximum queued control callstimeout- positive control-operation deadline, at most 30 secondsshutdownWait- positive maximum control-executor shutdown wait, at most 10 seconds- Returns:
- this builder
-
confirmationPolicy
Sets bounded confirmation retention for nugget controls.- Parameters:
ttl- positive confirmation time-to-live, at most five minutesmaxRetained- maximum retained live challenges- Returns:
- this builder
-
runtimeCloseAction
Sets the runtime close capability used for graceful nugget shutdown.The builder-owned runtime assembly path installs the authoritative
MiddlewareRuntime.close()action here. The action is executed asynchronously after the public result boundary and must not be the admin service's ownAutoCloseable.close()method.- Parameters:
value- runtime close action, ornull- Returns:
- this builder
-
terminationCapability
Sets the injected self-termination capability for forced nugget termination tests or controlled embedders.The implementation never installs a platform termination primitive by default. Supplying this callback does not enable kill unless
killEnabled(boolean)is also set totrue; production code must not use this hook to implement arbitrary process-id selection or shell execution.- Parameters:
value- injected self-termination callback, ornull- Returns:
- this builder
-
storageRoot
Adds a configured storage root for disk introspection.- Parameters:
role- storage rolepath- root pathsensitive- whether path components are sensitive- Returns:
- this builder
-
build
-