Package ratpack.core.impose
Class ServerConfigImposition
- java.lang.Object
-
- ratpack.core.impose.ServerConfigImposition
-
- All Implemented Interfaces:
Imposition
public final class ServerConfigImposition extends Object implements Imposition
An override object for imposing server configuration.This type works with the
Impositions
mechanism. It allows arbitraryServerConfig
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 duringServerConfigBuilder.build()
. Note that theForceDevelopmentImposition
andForceServerListenPortImposition
are applied after this override.- Since:
- 1.2
- See Also:
Impositions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(ServerConfigBuilder builder)
Applies the overrides to the given builder.static ServerConfigImposition
of(Consumer<? super ServerConfigBuilder> overrides)
Creates an override that applies the given function to the server config builder.
-
-
-
Method Detail
-
of
public static ServerConfigImposition of(Consumer<? super ServerConfigBuilder> overrides)
Creates an override that applies the given function to the server config builder.- Parameters:
overrides
- the overrides- Returns:
- an overrides object, for the overrides registry
-
apply
public void apply(ServerConfigBuilder builder)
Applies the overrides to the given builder.- Parameters:
builder
- a server config builder
-
-