Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_APP_PATH
"ratpack.groovy"
|
static String |
DEFAULT_BINDINGS_PATH
"bindings.groovy"
|
static String |
DEFAULT_HANDLERS_PATH
"handlers.groovy"
|
Modifier and Type | Method and Description |
---|---|
static Action<? super RatpackServerSpec> |
app()
Creates an application defining action from a Groovy script named "ratpack.groovy".
|
static Action<? super RatpackServerSpec> |
app(boolean compileStatic)
Creates an application defining action from a Groovy script named "ratpack.groovy".
|
static Action<? super RatpackServerSpec> |
app(boolean compileStatic,
Path script)
Creates an application defining action from a Groovy script.
|
static Action<? super RatpackServerSpec> |
app(boolean compileStatic,
String... scriptPaths)
Creates an application defining action from a Groovy script.
|
static Action<? super RatpackServerSpec> |
app(Path script)
Creates an application defining action from a Groovy script.
|
static Action<? super RatpackServerSpec> |
appWithArgs(boolean compileStatic,
Path script,
String... args)
Creates an application defining action from a Groovy script.
|
static Action<? super RatpackServerSpec> |
appWithArgs(boolean compileStatic,
String[] scriptPaths,
String... args)
Creates an application defining action from a Groovy script.
|
static Action<? super RatpackServerSpec> |
appWithArgs(String... args)
Creates an application defining action from a Groovy script named "ratpack.groovy"
|
static Function<Registry,Registry> |
bindings()
Creates a registry building function from a Groovy script named "bindings.groovy".
|
static Function<Registry,Registry> |
bindings(boolean compileStatic)
Creates a registry building function from a Groovy script named "bindings.groovy".
|
static Function<Registry,Registry> |
bindings(boolean compileStatic,
String scriptPath)
Creates a registry building function from a Groovy script.
|
static Function<Registry,Registry> |
bindingsWithArgs(boolean compileStatic,
String scriptPath,
String... args)
Creates a registry building function from a Groovy script.
|
static void |
checkGroovy()
Asserts that the version of Groovy on the classpath meets the minimum requirement for Ratpack.
|
static Function<Registry,Handler> |
handlers()
Creates a handler defining function from a "handlers.groovy" Groovy script.
|
static Function<Registry,Handler> |
handlers(boolean compileStatic)
Creates a handler defining function from a "handlers.groovy" Groovy script.
|
static Function<Registry,Handler> |
handlers(boolean compileStatic,
String scriptPath)
Creates a handler defining function from a Groovy script.
|
static Function<Registry,Handler> |
handlersWithArgs(boolean compileStatic,
String scriptPath,
String... args)
Creates a handler defining function from a Groovy script.
|
public static final String DEFAULT_HANDLERS_PATH
public static final String DEFAULT_BINDINGS_PATH
public static final String DEFAULT_APP_PATH
public static void checkGroovy()
public static Action<? super RatpackServerSpec> app()
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
public static Action<? super RatpackServerSpec> app(boolean compileStatic)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
compileStatic
- whether to statically compile the scriptpublic static Action<? super RatpackServerSpec> app(Path script)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
script
- the scriptpublic static Action<? super RatpackServerSpec> app(boolean compileStatic, Path script)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
compileStatic
- whether to statically compile the scriptscript
- the scriptpublic static Action<? super RatpackServerSpec> app(boolean compileStatic, String... scriptPaths)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPaths
- the potential paths to the scripts (first existing is used)public static Action<? super RatpackServerSpec> appWithArgs(String... args)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
args
- args to make available to the script via the args
variablepublic static Action<? super RatpackServerSpec> appWithArgs(boolean compileStatic, Path script, String... args)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
compileStatic
- whether to statically compile the scriptscript
- the scriptargs
- args to make available to the script via the args
variablepublic static Action<? super RatpackServerSpec> appWithArgs(boolean compileStatic, String[] scriptPaths, String... args)
This method returns an action that can be used with RatpackServer.of(Action)
to create an application.
The script should call the Groovy.ratpack(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPaths
- the potential paths to the scripts (first existing is used)args
- args to make available to the script via the args
variablepublic static Function<Registry,Handler> handlers()
This method returns a function that can be used with RatpackServerSpec.handler(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.handlers(Closure)
method.
public static Function<Registry,Handler> handlers(boolean compileStatic)
This method returns a function that can be used with RatpackServerSpec.handler(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.handlers(Closure)
method.
compileStatic
- whether to statically compile the scriptpublic static Function<Registry,Handler> handlers(boolean compileStatic, String scriptPath)
This method returns a function that can be used with RatpackServerSpec.handler(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.handlers(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPath
- the path to the scriptpublic static Function<Registry,Handler> handlersWithArgs(boolean compileStatic, String scriptPath, String... args)
This method returns a function that can be used with RatpackServerSpec.handler(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.handlers(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPath
- the path to the scriptargs
- args to make available to the script via the args
variablepublic static Function<Registry,Registry> bindings()
This method returns a function that can be used with RatpackServerSpec.registry(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.bindings(Closure)
method.
public static Function<Registry,Registry> bindings(boolean compileStatic)
This method returns a function that can be used with RatpackServerSpec.registry(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.bindings(Closure)
method.
compileStatic
- whether to statically compile the scriptpublic static Function<Registry,Registry> bindings(boolean compileStatic, String scriptPath)
This method returns a function that can be used with RatpackServerSpec.registry(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.bindings(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPath
- the path to the scriptpublic static Function<Registry,Registry> bindingsWithArgs(boolean compileStatic, String scriptPath, String... args)
This method returns a function that can be used with RatpackServerSpec.registry(Function)
when bootstrapping.
The script should call the Groovy.ratpack(Closure)
method, and only invoke the Groovy.Ratpack.bindings(Closure)
method.
compileStatic
- whether to statically compile the scriptscriptPath
- the path to the scriptargs
- args to make available to the script via the args
variable