Package | Description |
---|---|
ratpack.groovy.server |
Groovy implementations of the Ratpack server building classes.
|
ratpack.groovy.test.embed |
Support for creating Groovy based embedded applications.
|
ratpack.groovy.test.handling | |
ratpack.impose | |
ratpack.server |
Objects used to start a ratpack application.
|
ratpack.spring.config | |
ratpack.test.embed |
Support for creating embedded applications at test time, for testing Ratpack features and extensions.
|
ratpack.test.handling |
Test fixtures for exercising
Handler implementations without
start a full EmbeddedApp . |
Modifier and Type | Method and Description |
---|---|
GroovyRatpackServerSpec |
GroovyRatpackServerSpec.serverConfig(Action<? super ServerConfigBuilder> action) |
Modifier and Type | Method and Description |
---|---|
static GroovyEmbeddedApp |
GroovyEmbeddedApp.fromServer(ServerConfigBuilder serverConfig,
Closure<?> definition) |
Modifier and Type | Method and Description |
---|---|
GroovyRequestFixture |
GroovyRequestFixture.serverConfig(Action<? super ServerConfigBuilder> action)
Configures the server config to have no base dir and given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
ServerConfigImposition.apply(ServerConfigBuilder builder)
Applies the overrides to the given builder.
|
Modifier and Type | Method and Description |
---|---|
static ServerConfigImposition |
ServerConfigImposition.of(java.util.function.Consumer<? super ServerConfigBuilder> overrides)
Creates an override that applies the given function to the server config builder.
|
Modifier and Type | Method and Description |
---|---|
ServerConfigBuilder |
ServerConfigBuilder.add(ConfigSource configSource)
Adds a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.address(java.net.InetAddress address)
Sets the address to bind to.
|
ServerConfigBuilder |
ServerConfigBuilder.args(java.lang.String[] args)
Adds the given args as a config source.
|
ServerConfigBuilder |
ServerConfigBuilder.args(java.lang.String separator,
java.lang.String[] args)
Invokes
args(String, String, String[]) , with no prefix. |
ServerConfigBuilder |
ServerConfigBuilder.args(java.lang.String prefix,
java.lang.String separator,
java.lang.String[] args)
Adds a configuration source for the given string args.
|
default ServerConfigBuilder |
ServerConfigBuilder.baseDir(java.io.File file)
|
ServerConfigBuilder |
ServerConfigBuilder.baseDir(java.nio.file.Path baseDir)
Sets the root of the filesystem for the application.
|
static ServerConfigBuilder |
ServerConfig.builder() |
ServerConfigBuilder |
ServerConfigBuilder.configureObjectMapper(Action<ObjectMapper> action)
Configures the object mapper used for binding configuration data to arbitrary objects.
|
ServerConfigBuilder |
ServerConfigBuilder.connectQueueSize(int connectQueueSize)
The maximum amount of connections that may be waiting to be accepted at any time.
|
ServerConfigBuilder |
ServerConfigBuilder.connectTimeoutMillis(int connectTimeoutMillis)
The connect timeout of the channel.
|
ServerConfigBuilder |
ServerConfigBuilder.development(boolean development)
Whether or not the application is "development".
|
static ServerConfigBuilder |
ServerConfig.embedded()
Creates a builder configured for development mode and an ephemeral port.
|
ServerConfigBuilder |
ServerConfigBuilder.env()
Adds a configuration source for environment variables starting with the prefix "RATPACK_".
|
ServerConfigBuilder |
ServerConfigBuilder.env(EnvironmentParser environmentParser)
Adds a configuration source for environment variables using custom parsing logic.
|
ServerConfigBuilder |
ServerConfigBuilder.env(java.lang.String prefix)
Adds a configuration source for environment variables starting with the specified prefix.
|
ServerConfigBuilder |
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.
|
default ServerConfigBuilder |
ServerConfigBuilder.findBaseDir()
Sets the base dir using
BaseDir.find() . |
default ServerConfigBuilder |
ServerConfigBuilder.findBaseDir(java.lang.String markerFilePath)
Sets the base dir using
BaseDir.find(String) . |
ServerConfigBuilder |
ServerConfigBuilder.idleTimeout(java.time.Duration idleTimeout)
The default read timeout of the channel.
|
ServerConfigBuilder |
ServerConfigBuilder.json(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a JSON file.
|
ServerConfigBuilder |
ServerConfigBuilder.json(java.nio.file.Path path)
Adds a configuration source for a JSON file.
|
ServerConfigBuilder |
ServerConfigBuilder.json(java.lang.String path)
Adds the JSON file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.json(java.net.URL url)
Adds a configuration source for a JSON file.
|
ServerConfigBuilder |
ServerConfigBuilder.maxChunkSize(int maxChunkSize)
The maximum size of read chunks of request/response bodies.
|
ServerConfigBuilder |
ServerConfigBuilder.maxContentLength(int maxContentLength)
The max number of bytes a request body can be.
|
ServerConfigBuilder |
ServerConfigBuilder.maxHeaderSize(int maxHeaderSize)
The maximum size of all headers allowed for reading http requests.
|
ServerConfigBuilder |
ServerConfigBuilder.maxInitialLineLength(int maxInitialLineLength)
The maximum initial line length allowed for reading http requests.
|
ServerConfigBuilder |
ServerConfigBuilder.maxMessagesPerRead(int maxMessagesPerRead)
The maximum number of messages to read per read loop.
|
ServerConfigBuilder |
ServerConfigBuilder.object(java.lang.String path,
java.lang.Object object)
Adds the object's fields at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.onError(Action<? super java.lang.Throwable> errorHandler)
Sets the error all that will be used for added configuration sources.
|
ServerConfigBuilder |
ServerConfigBuilder.port(int port)
Sets the port to listen for requests on.
|
ServerConfigBuilder |
ServerConfigBuilder.props(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.props(java.util.Map<java.lang.String,java.lang.String> map)
Adds a configuration source for a Map (flat key-value pairs).
|
ServerConfigBuilder |
ServerConfigBuilder.props(java.nio.file.Path path)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.props(java.util.Properties properties)
Adds a configuration source for a properties object.
|
ServerConfigBuilder |
ServerConfigBuilder.props(java.lang.String path)
Adds the properties file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.props(java.net.URL url)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.publicAddress(java.net.URI publicAddress)
The public address of the application.
|
ServerConfigBuilder |
ServerConfigBuilder.receiveBufferSize(int receiveBufferSize)
The StandardSocketOptions.SO_RCVBUF option.
|
ServerConfigBuilder |
ServerConfigBuilder.registerShutdownHook(boolean registerShutdownHook)
Whether or not to register a JVM shutdown hook to gracefully stop the server.
|
default ServerConfigBuilder |
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.
|
default ServerConfigBuilder |
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.
|
ServerConfigBuilder |
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.
|
ServerConfigBuilder |
ServerConfigBuilder.requireClientSslAuth(boolean requireClientSslAuth)
Deprecated.
since 1.5, prefer
ssl(SslContext) |
ServerConfigBuilder |
ServerConfigBuilder.ssl(io.netty.handler.ssl.SslContext sslContext)
The SSL context to use if the application serves content over HTTPS.
|
ServerConfigBuilder |
ServerConfigBuilder.ssl(javax.net.ssl.SSLContext sslContext)
Deprecated.
since 1.5, replaced by
ssl(SslContext) |
ServerConfigBuilder |
ServerConfigBuilder.sysProps()
Adds a configuration source for system properties starting with the prefix "ratpack.".
|
ServerConfigBuilder |
ServerConfigBuilder.sysProps(java.lang.String prefix)
Adds a configuration source for system properties starting with the specified prefix.
|
ServerConfigBuilder |
ServerConfigBuilder.threads(int threads)
The number of threads to use.
|
ServerConfigBuilder |
ServerConfigBuilder.writeSpinCount(int writeSpinCount)
The maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(com.google.common.io.ByteSource byteSource)
Adds a configuration source for a YAML file.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(java.nio.file.Path path)
Adds a configuration source for a YAML file.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(java.lang.String path)
Adds the YAML file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(java.net.URL url)
Adds a configuration source for a YAML file.
|
Modifier and Type | Method and Description |
---|---|
default RatpackServerSpec |
RatpackServerSpec.serverConfig(ServerConfigBuilder builder)
Convenience function that
builds the config from the given builder and delegates to RatpackServerSpec.serverConfig(ServerConfig) . |
Modifier and Type | Method and Description |
---|---|
static ServerConfig |
ServerConfig.of(Action<? super ServerConfigBuilder> action) |
default RatpackServerSpec |
RatpackServerSpec.serverConfig(Action<? super ServerConfigBuilder> action) |
Modifier and Type | Method and Description |
---|---|
Action<ServerConfigBuilder> |
RatpackServerCustomizerAdapter.getServerConfig() |
Action<ServerConfigBuilder> |
RatpackServerCustomizer.getServerConfig() |
Modifier and Type | Method and Description |
---|---|
static EmbeddedApp |
EmbeddedApp.fromServer(ServerConfigBuilder serverConfig,
Action<? super RatpackServerSpec> definition)
Creates an embedded application using the given server config, and server creating function.
|
Modifier and Type | Method and Description |
---|---|
RequestFixture |
RequestFixture.serverConfig(Action<? super ServerConfigBuilder> action)
Configures the server config to have no base dir and given configuration.
|