Package ratpack.groovy
Interface Groovy.Ratpack
-
- Enclosing class:
- Groovy
public static interface Groovy.Ratpack
The definition of a Groovy Ratpack application.- See Also:
Groovy.ratpack(groovy.lang.Closure)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
bindings(Closure<?> configurer)
Registers the closure used to configure theBindingsSpec
that will back the application.void
handlers(Closure<?> configurer)
Registers the closure used to build the handler chain of the application.void
include(String path)
Evaluates the path provided using the Ratpack DSL and applies the configuration to this server.void
include(Path path)
Evaluates the provided path using the Ratpack DSL and applies the configuration to this server.void
serverConfig(Closure<?> configurer)
Registers the closure used to build the configuration of the server.
-
-
-
Method Detail
-
bindings
void bindings(@DelegatesTo(value=BindingsSpec.class,strategy=1) Closure<?> configurer)
Registers the closure used to configure theBindingsSpec
that will back the application.- Parameters:
configurer
- The configuration closure, delegating toBindingsSpec
-
handlers
void handlers(@DelegatesTo(value=GroovyChain.class,strategy=1) Closure<?> configurer)
Registers the closure used to build the handler chain of the application.- Parameters:
configurer
- The configuration closure, delegating toGroovyChain
-
serverConfig
void serverConfig(@DelegatesTo(value=ServerConfigBuilder.class,strategy=1) Closure<?> configurer)
Registers the closure used to build the configuration of the server.- Parameters:
configurer
- The configuration closure, delegating toServerConfigBuilder
-
include
void include(Path path)
Evaluates the provided path using the Ratpack DSL and applies the configuration to this server.The configuration supplied by the included path are applied inline with the existing parent configuration. This allows the same semantics as specifying the configuration in a single file to be followed. For
bindings(Closure)
, the configuration is appended. Forhandlers(groovy.lang.Closure<?>)
andserverConfig(Closure)
, the configuration is merged. Settings from the parent configuration that are applied after theinclude
, will be applied after the child configurations.If the
path
is a relative path, then it will be resolved against the location of the parent script file that is including it.- Parameters:
path
- The absolute path to the external Groovy DSL to included into the server.- Since:
- 1.3
-
include
void include(String path)
Evaluates the path provided using the Ratpack DSL and applies the configuration to this server.The provided string is evaluated using
Paths.get(String, String...)
- Parameters:
path
- The absolute path to the external Groovy DSL to included into the server.- Since:
- 1.3
- See Also:
include(Path)
-
-