Package | Description |
---|---|
ratpack.groovy.test.handling | |
ratpack.server |
Objects used to start a ratpack application.
|
ratpack.test.handling |
Modifier and Type | Method and Description |
---|---|
GroovyRequestFixture |
GroovyRequestFixture.serverConfig(Action<? super ServerConfig.Builder> action)
Configures the server config to have no base dir and given configuration.
|
GroovyRequestFixture |
GroovyRequestFixture.serverConfig(Path baseDir,
Action<? super ServerConfig.Builder> action)
Configures the server config to have the given base dir and given configuration.
|
Modifier and Type | Method and Description |
---|---|
ServerConfig.Builder |
ServerConfig.Builder.address(InetAddress address)
Sets the address to bind to.
|
static ServerConfig.Builder |
ServerConfig.baseDir(File baseDir)
Create a new builder, using the given file as the base dir.
|
static ServerConfig.Builder |
ServerConfig.baseDir(Path baseDir)
Create a new builder, using the given file as the base dir.
|
ServerConfig.Builder |
ServerConfig.Builder.development(boolean development)
Whether or not the application is "development".
|
static ServerConfig.Builder |
ServerConfig.embedded()
Creates a builder configured to use no base dir, development mode and an ephemeral port.
|
static ServerConfig.Builder |
ServerConfig.embedded(Path baseDir)
Creates a builder configured to use the given base dir, development mode and an ephemeral port.
|
ServerConfig.Builder |
ServerConfig.Builder.env()
Adds a configuration source for environment variables starting with the prefix .
|
ServerConfig.Builder |
ServerConfig.Builder.env(String prefix)
Adds a configuration source for environment variables starting with the specified prefix.
|
static ServerConfig.Builder |
ServerConfig.findBaseDirProps()
Creates a builder by finding a properties file with the default name ().
|
static ServerConfig.Builder |
ServerConfig.findBaseDirProps(String propertiesPath)
Creates a builder based on a properties file with the given path either on the classpath or relative to the working directory.
|
ServerConfig.Builder |
ServerConfig.Builder.maxContentLength(int maxContentLength)
The max number of bytes a request body can be.
|
static ServerConfig.Builder |
ServerConfig.noBaseDir()
Creates a builder configured to use no base dir.
|
ServerConfig.Builder |
ServerConfig.Builder.port(int port)
Sets the port to listen for requests on.
|
ServerConfig.Builder |
ServerConfig.Builder.props(ByteSource byteSource)
Adds a configuration source for a properties file.
|
ServerConfig.Builder |
ServerConfig.Builder.props(Map<String,String> map)
Adds a configuration source for a Map (flat key-value pairs).
|
ServerConfig.Builder |
ServerConfig.Builder.props(Path path)
Adds a configuration source for a properties file.
|
ServerConfig.Builder |
ServerConfig.Builder.props(Properties properties)
Adds a configuration source for a properties object.
|
ServerConfig.Builder |
ServerConfig.Builder.props(String path)
Adds a configuration source for a properties file.
|
ServerConfig.Builder |
ServerConfig.Builder.props(URL url)
Adds a configuration source for a properties file.
|
ServerConfig.Builder |
ServerConfig.Builder.publicAddress(URI publicAddress)
The public address of the application.
|
ServerConfig.Builder |
ServerConfig.Builder.ssl(SSLContext sslContext)
The SSL context to use if the application serves content over HTTPS.
|
ServerConfig.Builder |
ServerConfig.Builder.sysProps()
Adds a configuration source for system properties starting with the prefix
|
ServerConfig.Builder |
ServerConfig.Builder.sysProps(String prefix)
Adds a configuration source for system properties starting with the specified prefix.
|
ServerConfig.Builder |
ServerConfig.Builder.threads(int threads)
The number of threads to use.
|
Modifier and Type | Method and Description |
---|---|
default RatpackServerSpec |
RatpackServerSpec.serverConfig(ServerConfig.Builder builder)
Convenience function that
builds the config from the given builder and delegates to RatpackServerSpec.serverConfig(ServerConfig) . |
Modifier and Type | Method and Description |
---|---|
RequestFixture |
RequestFixture.serverConfig(Action<? super ServerConfig.Builder> action)
Configures the server config to have no base dir and given configuration.
|
RequestFixture |
RequestFixture.serverConfig(Path baseDir,
Action<? super ServerConfig.Builder> action)
Configures the server config to have the given base dir and given configuration.
|