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 |
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(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(InetAddress address)
Sets the address to bind to.
|
ServerConfigBuilder |
ServerConfigBuilder.args(String[] args)
Adds the given args as a config source.
|
ServerConfigBuilder |
ServerConfigBuilder.args(String separator,
String[] args)
Invokes
args(String, String, String[]) , with no prefix. |
ServerConfigBuilder |
ServerConfigBuilder.args(String prefix,
String separator,
String[] args)
Adds a configuration source for the given string args.
|
default ServerConfigBuilder |
ServerConfigBuilder.baseDir(File file)
|
ServerConfigBuilder |
ServerConfigBuilder.baseDir(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.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(String prefix)
Adds a configuration source for environment variables starting with the specified prefix.
|
ServerConfigBuilder |
ServerConfigBuilder.env(String prefix,
Function<String,String> mapFunc)
Adds a configuration source for environment variables starting with the specified prefix.
|
ServerConfigBuilder |
ServerConfigBuilder.json(ByteSource byteSource)
Adds a configuration source for a JSON file.
|
ServerConfigBuilder |
ServerConfigBuilder.json(Path path)
Adds a configuration source for a JSON file.
|
ServerConfigBuilder |
ServerConfigBuilder.json(String path)
Adds the JSON file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.json(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.maxMessagesPerRead(int maxMessagesPerRead)
The maximum number of messages to read per read loop.
|
ServerConfigBuilder |
ServerConfigBuilder.onError(Action<? super 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(ByteSource byteSource)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.props(Map<String,String> map)
Adds a configuration source for a Map (flat key-value pairs).
|
ServerConfigBuilder |
ServerConfigBuilder.props(Path path)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.props(Properties properties)
Adds a configuration source for a properties object.
|
ServerConfigBuilder |
ServerConfigBuilder.props(String path)
Adds the properties file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.props(URL url)
Adds a configuration source for a properties file.
|
ServerConfigBuilder |
ServerConfigBuilder.publicAddress(URI publicAddress)
The public address of the application.
|
ServerConfigBuilder |
ServerConfigBuilder.receiveBufferSize(int receiveBufferSize)
The StandardSocketOptions.SO_RCVBUF option.
|
ServerConfigBuilder |
ServerConfigBuilder.require(String pointer,
Class<?> 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)
The server needs client SSL authentication.
|
ServerConfigBuilder |
ServerConfigBuilder.ssl(SSLContext sslContext)
The SSL context to use if the application serves content over HTTPS.
|
ServerConfigBuilder |
ServerConfigBuilder.sysProps()
Adds a configuration source for system properties starting with the prefix "ratpack.".
|
ServerConfigBuilder |
ServerConfigBuilder.sysProps(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(ByteSource byteSource)
Adds a configuration source for a YAML file.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(Path path)
Adds a configuration source for a YAML file.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(String path)
Adds the YAML file at the given path as a configuration source.
|
ServerConfigBuilder |
ServerConfigBuilder.yaml(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> |
RatpackServerCustomizer.getServerConfig() |
Action<ServerConfigBuilder> |
RatpackServerCustomizerAdapter.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.
|