Interface ServerConfigBuilder
-
- All Superinterfaces:
ConfigDataBuilder
public interface ServerConfigBuilder extends ConfigDataBuilder
Builds aServerConfig.
-
-
Field Summary
-
Fields inherited from interface ratpack.config.ConfigDataBuilder
DEFAULT_ENV_PREFIX, DEFAULT_PROP_PREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description ServerConfigBuilderadd(ConfigSource configSource)Adds a configuration source.ServerConfigBuilderaddress(java.net.InetAddress address)Sets the address to bind to.ServerConfigBuilderargs(java.lang.String[] args)Adds the given args as a config source.ServerConfigBuilderargs(java.lang.String separator, java.lang.String[] args)Invokesargs(String, String, String[]), with no prefix.ServerConfigBuilderargs(java.lang.String prefix, java.lang.String separator, java.lang.String[] args)Adds a configuration source for the given string args.default ServerConfigBuilderbaseDir(java.io.File file)ServerConfigBuilderbaseDir(java.nio.file.Path baseDir)Sets the root of the filesystem for the application.ServerConfigbuild()Builds the server config.ServerConfigBuilderconfigureObjectMapper(Action<ObjectMapper> action)Configures the object mapper used for binding configuration data to arbitrary objects.ServerConfigBuilderconnectQueueSize(int connectQueueSize)The maximum amount of connections that may be waiting to be accepted at any time.ServerConfigBuilderconnectTimeoutMillis(int connectTimeoutMillis)The connect timeout of the channel.ServerConfigBuilderdevelopment(boolean development)Whether or not the application is "development".ServerConfigBuilderenv()Adds a configuration source for environment variables starting with the prefix "RATPACK_".ServerConfigBuilderenv(java.lang.String prefix)Adds a configuration source for environment variables starting with the specified prefix.ServerConfigBuilderenv(java.lang.String prefix, Function<java.lang.String,java.lang.String> mapFunc)Adds a configuration source for environment variables starting with the specified prefix.ServerConfigBuilderenv(EnvironmentParser environmentParser)Adds a configuration source for environment variables using custom parsing logic.default ServerConfigBuilderfindBaseDir()Sets the base dir usingBaseDir.find().default ServerConfigBuilderfindBaseDir(java.lang.String markerFilePath)Sets the base dir usingBaseDir.find(String).ServerConfigBuilderidleTimeout(java.time.Duration idleTimeout)The default read timeout of the channel.ServerConfigBuilderjson(com.google.common.io.ByteSource byteSource)Adds a configuration source for a JSON file.ServerConfigBuilderjson(java.lang.String path)Adds the JSON file at the given path as a configuration source.ServerConfigBuilderjson(java.net.URL url)Adds a configuration source for a JSON file.ServerConfigBuilderjson(java.nio.file.Path path)Adds a configuration source for a JSON file.ServerConfigBuildermaxChunkSize(int maxChunkSize)The maximum size of read chunks of request/response bodies.ServerConfigBuildermaxContentLength(int maxContentLength)The max number of bytes a request body can be.ServerConfigBuildermaxHeaderSize(int maxHeaderSize)The maximum size of all headers allowed for reading http requests.ServerConfigBuildermaxInitialLineLength(int maxInitialLineLength)The maximum initial line length allowed for reading http requests.ServerConfigBuildermaxMessagesPerRead(int maxMessagesPerRead)The maximum number of messages to read per read loop.ServerConfigBuilderobject(java.lang.String path, java.lang.Object object)Adds the object's fields at the given path as a configuration source.ServerConfigBuilderonError(Action<? super java.lang.Throwable> errorHandler)Sets the error all that will be used for added configuration sources.ServerConfigBuilderport(int port)Sets the port to listen for requests on.ServerConfigBuilderportFile(java.nio.file.Path portFile)The path where to store the bind portServerConfigBuilderprops(com.google.common.io.ByteSource byteSource)Adds a configuration source for a properties file.ServerConfigBuilderprops(java.lang.String path)Adds the properties file at the given path as a configuration source.ServerConfigBuilderprops(java.net.URL url)Adds a configuration source for a properties file.ServerConfigBuilderprops(java.nio.file.Path path)Adds a configuration source for a properties file.ServerConfigBuilderprops(java.util.Map<java.lang.String,java.lang.String> map)Adds a configuration source for a Map (flat key-value pairs).ServerConfigBuilderprops(java.util.Properties properties)Adds a configuration source for a properties object.ServerConfigBuilderpublicAddress(java.net.URI publicAddress)The public address of the application.ServerConfigBuilderreceiveBufferSize(int receiveBufferSize)The StandardSocketOptions.SO_RCVBUF option.ServerConfigBuilderregisterShutdownHook(boolean registerShutdownHook)Whether or not to register a JVM shutdown hook to gracefully stop the server.ServerConfigBuilderrequire(java.lang.String pointer, com.google.common.reflect.TypeToken<?> type)Declares that it is required that the server config provide an object of the given type at the given path.default ServerConfigBuilderrequire(java.lang.String pointer, java.lang.Class<?> type)Declares that it is required that the server config provide an object of the given type at the given path.default ServerConfigBuilderrequire(java.lang.String pointer, java.lang.reflect.Type type)Declares that it is required that the server config provide an object of the given type at the given path.ServerConfigBuilderrequireClientSslAuth(boolean requireClientSslAuth)Deprecated.since 1.5, preferssl(SslContext)ServerConfigBuilderssl(io.netty.handler.ssl.SslContext sslContext)The SSL context to use if the application serves content over HTTPS.ServerConfigBuilderssl(javax.net.ssl.SSLContext sslContext)Deprecated.since 1.5, replaced byssl(SslContext)ServerConfigBuildersysProps()Adds a configuration source for system properties starting with the prefix "ratpack.".ServerConfigBuildersysProps(java.lang.String prefix)Adds a configuration source for system properties starting with the specified prefix.ServerConfigBuilderthreads(int threads)The number of threads to use.ServerConfigBuilderwriteSpinCount(int writeSpinCount)The maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.ServerConfigBuilderyaml(com.google.common.io.ByteSource byteSource)Adds a configuration source for a YAML file.ServerConfigBuilderyaml(java.lang.String path)Adds the YAML file at the given path as a configuration source.ServerConfigBuilderyaml(java.net.URL url)Adds a configuration source for a YAML file.ServerConfigBuilderyaml(java.nio.file.Path path)Adds a configuration source for a YAML file.-
Methods inherited from interface ratpack.config.ConfigDataBuilder
getConfigSources, getObjectMapper, jacksonModules
-
-
-
-
Method Detail
-
baseDir
ServerConfigBuilder baseDir(java.nio.file.Path baseDir)
Sets the root of the filesystem for the application.The
base diracts as the portable file system for the application. All paths within the application, resolved by Ratpack API are resolved from this point. For example,Chain.files(Action)allows serving static files within the base dir.The base dir is also used to resolve paths to file system locations when using
json(String),yaml(String)andprops(String). This allows config files to travel with the application within the base dir.It is generally desirable to use the
BaseDir.find()to dynamically find the base dir at runtime.- Parameters:
baseDir- the base dir- Returns:
this
-
baseDir
default ServerConfigBuilder baseDir(java.io.File file)
- Parameters:
file- the base dir- Returns:
this
-
findBaseDir
default ServerConfigBuilder findBaseDir()
Sets the base dir usingBaseDir.find().- Returns:
this- Since:
- 1.4
-
findBaseDir
default ServerConfigBuilder findBaseDir(java.lang.String markerFilePath)
Sets the base dir usingBaseDir.find(String).- Parameters:
markerFilePath- the path to the marker file on the classpath- Returns:
this- Since:
- 1.4
-
port
ServerConfigBuilder port(int port)
Sets the port to listen for requests on.Defaults to 5050.
- Parameters:
port- the port to listen for requests on- Returns:
this- See Also:
ServerConfig.getPort()
-
address
ServerConfigBuilder address(java.net.InetAddress address)
Sets the address to bind to.Default value is
null.- Parameters:
address- The address to bind to- Returns:
this- See Also:
ServerConfig.getAddress()
-
development
ServerConfigBuilder development(boolean development)
Whether or not the application is "development".Default value is
false.- Parameters:
development- Whether or not the application is "development".- Returns:
this- See Also:
ServerConfig.isDevelopment()
-
threads
ServerConfigBuilder threads(int threads)
The number of threads to use.Defaults to
ServerConfig.DEFAULT_THREADS- Parameters:
threads- the size of the event loop thread pool- Returns:
this- See Also:
ServerConfig.getThreads()
-
registerShutdownHook
ServerConfigBuilder registerShutdownHook(boolean registerShutdownHook)
Whether or not to register a JVM shutdown hook to gracefully stop the server.Default value is
true.- Parameters:
registerShutdownHook- whether to register or not- Returns:
this- Since:
- 1.6
- See Also:
ServerConfig.isRegisterShutdownHook()
-
publicAddress
ServerConfigBuilder publicAddress(java.net.URI publicAddress)
The public address of the application.Default value is
null.- Parameters:
publicAddress- the public address of the application- Returns:
this- See Also:
ServerConfig.getPublicAddress()
-
maxContentLength
ServerConfigBuilder maxContentLength(int maxContentLength)
The max number of bytes a request body can be. Default value is1048576(1 megabyte).- Parameters:
maxContentLength- the max content length to accept- Returns:
this- See Also:
ServerConfig.getMaxContentLength()
-
maxChunkSize
ServerConfigBuilder maxChunkSize(int maxChunkSize)
The maximum size of read chunks of request/response bodies. Default value isServerConfig.DEFAULT_MAX_CHUNK_SIZE.- Parameters:
maxChunkSize- the maximum size of read chunks of request/response bodies- Returns:
this- See Also:
ServerConfig.getMaxChunkSize()
-
maxInitialLineLength
ServerConfigBuilder maxInitialLineLength(int maxInitialLineLength)
The maximum initial line length allowed for reading http requests. Default value isServerConfig.DEFAULT_MAX_INITIAL_LINE_LENGTH.- Parameters:
maxInitialLineLength- the maximum length of the initial line of the request.- Returns:
this- Since:
- 1.4
- See Also:
ServerConfig.getMaxInitialLineLength()
-
maxHeaderSize
ServerConfigBuilder maxHeaderSize(int maxHeaderSize)
The maximum size of all headers allowed for reading http requests. Default value isServerConfig.DEFAULT_MAX_HEADER_SIZE.- Parameters:
maxHeaderSize- the maximum size of the sum of the length of all headers.- Returns:
this- Since:
- 1.4
- See Also:
ServerConfig.getMaxHeaderSize()
-
connectTimeoutMillis
ServerConfigBuilder connectTimeoutMillis(int connectTimeoutMillis)
The connect timeout of the channel.- Parameters:
connectTimeoutMillis- the connect timeout in milliseconds- Returns:
this- See Also:
ServerConfig.getConnectTimeoutMillis()
-
idleTimeout
ServerConfigBuilder idleTimeout(java.time.Duration idleTimeout)
The default read timeout of the channel.- Parameters:
idleTimeout- the idleTimeout (Duration.ZERO= no timeout, must not be negative, must not be null)- Returns:
this- Since:
- 1.5
- See Also:
ServerConfig.getIdleTimeout()
-
maxMessagesPerRead
ServerConfigBuilder maxMessagesPerRead(int maxMessagesPerRead)
The maximum number of messages to read per read loop.- Parameters:
maxMessagesPerRead- the max messages per read- Returns:
this- See Also:
ServerConfig.getMaxMessagesPerRead()
-
receiveBufferSize
ServerConfigBuilder receiveBufferSize(int receiveBufferSize)
The StandardSocketOptions.SO_RCVBUF option.- Parameters:
receiveBufferSize- the recieve buffer size- Returns:
this- See Also:
ServerConfig.getReceiveBufferSize()
-
connectQueueSize
ServerConfigBuilder connectQueueSize(int connectQueueSize)
The maximum amount of connections that may be waiting to be accepted at any time.This is effectively the
SO_BACKLOGstandard socket parameter. If the queue is full (i.e. there are too many pending connections), connection attempts will be rejected. Established connections are not part of this queue so do not contribute towards the limit.The default value is platform specific, but usually either 200 or 128. Most application do not need to change this default.
- Parameters:
connectQueueSize- connection queue size- Since:
- 1.5
-
writeSpinCount
ServerConfigBuilder writeSpinCount(int writeSpinCount)
The maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.- Parameters:
writeSpinCount- the write spin count- Returns:
this- See Also:
ServerConfig.getWriteSpinCount()
-
portFile
ServerConfigBuilder portFile(java.nio.file.Path portFile)
The path where to store the bind port- Parameters:
portFile- the path file- Returns:
this- Since:
- 1.8
- See Also:
ServerConfig.getPortFile()
-
ssl
@Deprecated ServerConfigBuilder ssl(javax.net.ssl.SSLContext sslContext)
Deprecated.since 1.5, replaced byssl(SslContext)The SSL context to use if the application serves content over HTTPS.- Parameters:
sslContext- the SSL context- Returns:
this- See Also:
SSLContexts,ServerConfig.getSslContext()
-
requireClientSslAuth
@Deprecated ServerConfigBuilder requireClientSslAuth(boolean requireClientSslAuth)
Deprecated.since 1.5, preferssl(SslContext)The server needs client SSL authentication.- Parameters:
requireClientSslAuth- whether or not server needs client SSL authentication- Returns:
this
-
ssl
ServerConfigBuilder ssl(io.netty.handler.ssl.SslContext sslContext)
The SSL context to use if the application serves content over HTTPS.- Parameters:
sslContext- the SSL context- Returns:
this- Since:
- 1.5
- See Also:
SslContextBuilder
-
env
ServerConfigBuilder env()
Adds a configuration source for environment variables starting with the prefix "RATPACK_".The prefix will be removed before loading the data. The environment variable name is split into per-object segments using double underscore as an object boundary. Segments are transformed into camel-case field names using a single underscore as a word boundary.
- Specified by:
envin interfaceConfigDataBuilder- Returns:
- this
-
env
ServerConfigBuilder env(java.lang.String prefix)
Adds a configuration source for environment variables starting with the specified prefix. The prefix will be removed before loading the data. The environment variable name is split into per-object segments using double underscore as an object boundary. Segments are transformed into camel-case field names using a single underscore as a word boundary.- Specified by:
envin interfaceConfigDataBuilder- Parameters:
prefix- the prefix which should be used to identify relevant environment variables- Returns:
- this
-
args
ServerConfigBuilder args(java.lang.String[] args)
Adds the given args as a config source.This method is designed to be used with the args var of the
static main(String... args)application entry point. This allows configuration parameters to be passed to the application on the command line.Each arg should be of the format
«key»=«value». For the following example, the application has been started with the argumentthing.name=foo.import ratpack.test.embed.EmbeddedApp; import static org.junit.Assert.assertEquals; public class Example { static class Thing { public String name; } public static void main(String... args) throws Exception { EmbeddedApp.of(a -> a .serverConfig(s -> s .args(args) .require("/thing", Thing.class) ) .handlers(c -> c .get(ctx -> ctx.render(ctx.get(Thing.class).name)) ) ).test(httpClient -> assertEquals(httpClient.getText(), "foo") ); } }- Specified by:
argsin interfaceConfigDataBuilder- Parameters:
args- the argument values- Returns:
this- Since:
- 1.1
-
args
ServerConfigBuilder args(java.lang.String separator, java.lang.String[] args)
Invokesargs(String, String, String[]), with no prefix.- Specified by:
argsin interfaceConfigDataBuilder- Parameters:
separator- the separator of the key and value in each argargs- the argument values- Returns:
this- Since:
- 1.1
- See Also:
args(String[])
-
args
ServerConfigBuilder args(java.lang.String prefix, java.lang.String separator, java.lang.String[] args)
Adds a configuration source for the given string args.Args that do not start with the given
prefixare ignored. The remaining are each split using the givenseparator(as a literal string, not as a regex), then trimmed of the prefix.- Specified by:
argsin interfaceConfigDataBuilder- Parameters:
prefix- the prefix that each arg must have to be considered (usenullor""for no prefix)separator- the separator between the key and the valueargs- the argument values- Returns:
this- Since:
- 1.1
- See Also:
args(String[])
-
props
ServerConfigBuilder props(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a properties file.- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
byteSource- the source of the properties data- Returns:
this
-
props
ServerConfigBuilder props(java.lang.String path)
Adds the properties file at the given path as a configuration source.If a base dir is set, the path will be resolved relative to it. Otherwise, it will be resolved relative to the file system root.
- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
path- the path to the file- Returns:
this
-
props
ServerConfigBuilder props(java.nio.file.Path path)
Adds a configuration source for a properties file.- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
path- the source of the properties data- Returns:
this
-
props
ServerConfigBuilder props(java.util.Properties properties)
Adds a configuration source for a properties object.- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
properties- the properties object- Returns:
this
-
object
ServerConfigBuilder object(java.lang.String path, java.lang.Object object)
Adds the object's fields at the given path as a configuration source.The path is a period separated key string. The given object is subject to value merging and overrides as per other config sources.
import ratpack.config.ConfigData; import java.util.Collections; import static org.junit.Assert.assertEquals; public class Example { static class Thing { public String f1; public String f2; public String f3; } public static void main(String... args) throws Exception { Thing input = new Thing(); input.f1 = "1"; input.f2 = "2"; ConfigData configData = ConfigData.of(c -> c .object("thing", input) .props(Collections.singletonMap("thing.f1", "changed")) .object("thing.f3", "changed") ); Thing thing = configData.get("/thing", Thing.class); assertEquals("changed", thing.f1); assertEquals("2", thing.f2); assertEquals("changed", thing.f3); } }- Specified by:
objectin interfaceConfigDataBuilder- Parameters:
path- the configuration path the object's fields should be mapped on toobject- the object from which to derive the configuration fields- Returns:
this- Since:
- 1.4
-
props
ServerConfigBuilder props(java.util.Map<java.lang.String,java.lang.String> map)
Adds a configuration source for a Map (flat key-value pairs). This signature is particularly useful for providing default values as shown below:import com.google.common.collect.ImmutableMap; import ratpack.config.ConfigData; import ratpack.server.ServerConfig; import static org.junit.Assert.*; public class Example { public static void main(String[] args) throws Exception { ServerConfig serverConfig = ServerConfig .builder() .props(ImmutableMap.of("server.port", "5060")) .sysProps() .build(); assertEquals(5060, serverConfig.getPort()); } }- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
map- the map- Returns:
this
-
props
ServerConfigBuilder props(java.net.URL url)
Adds a configuration source for a properties file.- Specified by:
propsin interfaceConfigDataBuilder- Parameters:
url- the source of the properties data- Returns:
this
-
sysProps
ServerConfigBuilder sysProps()
Adds a configuration source for system properties starting with the prefix "ratpack.".- Specified by:
sysPropsin interfaceConfigDataBuilder- Returns:
this
-
sysProps
ServerConfigBuilder sysProps(java.lang.String prefix)
Adds a configuration source for system properties starting with the specified prefix.- Specified by:
sysPropsin interfaceConfigDataBuilder- Parameters:
prefix- the prefix which should be used to identify relevant system properties; the prefix will be removed before loading the data- Returns:
this
-
onError
ServerConfigBuilder onError(Action<? super java.lang.Throwable> errorHandler)
Sets the error all that will be used for added configuration sources. The error all only applies to configuration sources added after this method is called; it is not applied retroactively.- Specified by:
onErrorin interfaceConfigDataBuilder- Parameters:
errorHandler- the error all- Returns:
this- See Also:
Action.noop(),Action.throwException()
-
configureObjectMapper
ServerConfigBuilder configureObjectMapper(Action<ObjectMapper> action)
Configures the object mapper used for binding configuration data to arbitrary objects.- Specified by:
configureObjectMapperin interfaceConfigDataBuilder- Parameters:
action- an action to perform upon the object mapper- Returns:
this
-
add
ServerConfigBuilder add(ConfigSource configSource)
Adds a configuration source.- Specified by:
addin interfaceConfigDataBuilder- Parameters:
configSource- the configuration source to add- Returns:
this
-
env
ServerConfigBuilder env(java.lang.String prefix, Function<java.lang.String,java.lang.String> mapFunc)
Adds a configuration source for environment variables starting with the specified prefix. The prefix will be removed before loading the data. The environment variable name is split into per-object segments using double underscore as an object boundary. Segments are transformed into field names using the specified transformation function rather than the default function.- Specified by:
envin interfaceConfigDataBuilder- Parameters:
prefix- the prefix which should be used to identify relevant environment variablesmapFunc- the function to transform segments into field names- Returns:
- this
-
env
ServerConfigBuilder env(EnvironmentParser environmentParser)
Adds a configuration source for environment variables using custom parsing logic.- Specified by:
envin interfaceConfigDataBuilder- Parameters:
environmentParser- the parser to use to interpret environment variables- Returns:
this
-
json
ServerConfigBuilder json(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a JSON file.- Specified by:
jsonin interfaceConfigDataBuilder- Parameters:
byteSource- the source of the JSON data- Returns:
this
-
json
ServerConfigBuilder json(java.nio.file.Path path)
Adds a configuration source for a JSON file.- Specified by:
jsonin interfaceConfigDataBuilder- Parameters:
path- the source of the JSON data- Returns:
this
-
json
ServerConfigBuilder json(java.lang.String path)
Adds the JSON file at the given path as a configuration source.If a base dir is set, the path will be resolved relative to it. Otherwise, it will be resolved relative to the file system root.
- Specified by:
jsonin interfaceConfigDataBuilder- Parameters:
path- the path to the file- Returns:
this
-
json
ServerConfigBuilder json(java.net.URL url)
Adds a configuration source for a JSON file.- Specified by:
jsonin interfaceConfigDataBuilder- Parameters:
url- the source of the JSON data- Returns:
this
-
yaml
ServerConfigBuilder yaml(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a YAML file.- Specified by:
yamlin interfaceConfigDataBuilder- Parameters:
byteSource- the source of the YAML data- Returns:
this
-
yaml
ServerConfigBuilder yaml(java.nio.file.Path path)
Adds a configuration source for a YAML file.- Specified by:
yamlin interfaceConfigDataBuilder- Parameters:
path- the source of the YAML data- Returns:
this
-
yaml
ServerConfigBuilder yaml(java.lang.String path)
Adds the YAML file at the given path as a configuration source.If a base dir is set, the path will be resolved relative to it. Otherwise, it will be resolved relative to the file system root.
- Specified by:
yamlin interfaceConfigDataBuilder- Parameters:
path- the path to the file- Returns:
this
-
yaml
ServerConfigBuilder yaml(java.net.URL url)
Adds a configuration source for a YAML file.- Specified by:
yamlin interfaceConfigDataBuilder- Parameters:
url- the source of the YAML data- Returns:
this
-
require
default ServerConfigBuilder require(java.lang.String pointer, java.lang.Class<?> type)
Declares that it is required that the server config provide an object of the given type at the given path.The
build()method will fail if the config is not able to provide the requested object.All objects declared using this method will also automatically be implicitly added to the base registry.
The
pointerargument is of the same format given to theConfigData.get(String, Class)method.import org.junit.Assert; import ratpack.test.embed.EmbeddedApp; import java.util.Collections; public class Example { static class MyConfig { public String value; } public static void main(String... args) throws Exception { EmbeddedApp.of(a -> a .serverConfig(s -> s .props(Collections.singletonMap("config.value", "foo")) .require("/config", MyConfig.class) ) .handlers(c -> c .get(ctx -> ctx.render(ctx.get(MyConfig.class).value)) ) ).test(httpClient -> Assert.assertEquals("foo", httpClient.getText()) ); } }- Parameters:
pointer- a JSON Pointer specifying the point in the configuration data to bind fromtype- the class of the type to bind to- Returns:
this
-
require
default ServerConfigBuilder require(java.lang.String pointer, java.lang.reflect.Type type)
Declares that it is required that the server config provide an object of the given type at the given path.- Parameters:
pointer- a JSON Pointer specifying the point in the configuration data to bind fromtype- the type to bind to- Returns:
this- Since:
- 1.4
-
require
ServerConfigBuilder require(java.lang.String pointer, com.google.common.reflect.TypeToken<?> type)
Declares that it is required that the server config provide an object of the given type at the given path.- Parameters:
pointer- a JSON Pointer specifying the point in the configuration data to bind fromtype- the type to bind to- Returns:
this- Since:
- 1.4
-
build
ServerConfig build()
Builds the server config.- Specified by:
buildin interfaceConfigDataBuilder- Returns:
- a server config
- See Also:
ServerConfigImposition
-
-