public final class ServerConfigImposition extends java.lang.Object implements Imposition
This type works with the Impositions mechanism.
It allows arbitrary ServerConfig to be overridden.
Every ServerConfigBuilder is override aware.
The overrides are captured when the builder is created.
If a ServerConfigImposition is present, its function will be applied to the builder during ServerConfigBuilder.build().
Note that the ForceDevelopmentImposition and ForceServerListenPortImposition are applied after this override.
Impositions| Modifier and Type | Method and Description |
|---|---|
void |
apply(ServerConfigBuilder builder)
Applies the overrides to the given builder.
|
static ServerConfigImposition |
of(java.util.function.Consumer<? super ServerConfigBuilder> overrides)
Creates an override that applies the given function to the server config builder.
|
public static ServerConfigImposition of(java.util.function.Consumer<? super ServerConfigBuilder> overrides)
overrides - the overridespublic void apply(ServerConfigBuilder builder)
builder - a server config builder