Package | Description |
---|---|
ratpack.groovy |
Support for writing Ratpack applications in the Groovy programming language.
|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
ratpack.guice |
Integration with Google Guice.
|
ratpack.handling |
The handling of application requests.
|
Modifier and Type | Method and Description |
---|---|
static void |
Groovy.chain(Chain chain,
Closure<?> closure)
Immediately executes the given
closure against the given chain, as a {@link GroovyChain}. |
Modifier and Type | Interface and Description |
---|---|
interface |
GroovyChain
A Groovy oriented handler chain builder DSL.
|
Modifier and Type | Class and Description |
---|---|
class |
GroovyChainAction
Convenient super class for packaging up Groovy handler chain logic.
|
Modifier and Type | Method and Description |
---|---|
void |
GroovyChainAction.execute(Chain chain)
Delegates to
GroovyChainAction.execute() , using the given chain for delegation. |
Modifier and Type | Method and Description |
---|---|
Handler |
GroovyChainAction.chain(Action<? super Chain> action) |
GroovyChain |
GroovyChain.fileSystem(String path,
Action<? super Chain> action) |
GroovyChain |
GroovyChainAction.fileSystem(String path,
Action<? super Chain> action) |
GroovyChain |
GroovyChain.prefix(String prefix,
Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the
relative path starts with the given
prefix . |
GroovyChain |
GroovyChainAction.prefix(String prefix,
Action<? super Chain> action) |
<T> GroovyChain |
GroovyChain.register(Class<? super T> type,
T service,
Action<? super Chain> action) |
<T> GroovyChain |
GroovyChainAction.register(Class<? super T> type,
T service,
Action<? super Chain> action) |
GroovyChain |
GroovyChain.register(Object service,
Action<? super Chain> action)
Adds a handler to this chain that inserts the given handler with the given service addition.
|
GroovyChain |
GroovyChainAction.register(Object service,
Action<? super Chain> action) |
Modifier and Type | Method and Description |
---|---|
static Handler |
Guice.handler(LaunchConfig launchConfig,
Action<? super ModuleRegistry> moduleConfigurer,
Action<? super Chain> chainConfigurer)
Creates a handler that can be used as the entry point for a Guice backed Ratpack app.
|
static Handler |
Guice.handler(LaunchConfig launchConfig,
Injector parentInjector,
Action<? super ModuleRegistry> moduleConfigurer,
Action<? super Chain> chainConfigurer)
Creates a handler that can be used as the entry point for a Guice backed Ratpack app.
|
Modifier and Type | Method and Description |
---|---|
Chain |
Chain.assets(String path,
String... indexFiles)
Adds a handler that serves static assets at the given file system path, relative to the contextual file system binding.
|
Chain |
Chain.delete(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is DELETE and the path is at the current root. |
Chain |
Chain.delete(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is DELETE . |
Chain |
Chain.fileSystem(String path,
Action<? super Chain> action)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler chain. |
Chain |
Chain.fileSystem(String path,
Handler handler)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler. |
Chain |
Chain.get(Handler handler)
Adds a handler that delegates to the given handler
if the
request HTTPMethod is GET and the path is at the
current root. |
Chain |
Chain.get(String path,
Handler handler)
Adds a handler that delegates to the given handler
if the relative
path matches the given path and the request
HTTPMethod is GET . |
Chain |
Chain.handler(Handler handler)
Adds the given handler to this.
|
Chain |
Chain.handler(String path,
Handler handler)
Adds a handler that delegates to the given handler if the relative
path
matches the given path exactly. |
Chain |
Chain.header(String headerName,
String headerValue,
Handler handler)
Adds a handler to the chain that delegates to the given handler if the request has a header with the given name and a its value matches the given value exactly.
|
Chain |
Chain.patch(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is PATCH and the path is at the current root. |
Chain |
Chain.patch(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is PATCH . |
Chain |
Chain.post(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is POST and the path is at the current root. |
Chain |
Chain.post(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is POST . |
Chain |
Chain.prefix(String prefix,
Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the
relative path starts with the given
prefix . |
Chain |
Chain.prefix(String prefix,
Handler handler)
Adds a handler that delegates to the given handler if the relative path starts with the given
prefix . |
Chain |
Chain.put(Handler handler)
Adds a handler that delegates to the given handler if
the
request HTTPMethod is PUT and the path is at the current root. |
Chain |
Chain.put(String path,
Handler handler)
Adds a handler that delegates to the given handler if
the relative
path matches the given path and the request HTTPMethod
is PUT . |
<T> Chain |
Chain.register(Class<? super T> type,
T service,
Action<? super Chain> action)
Adds a handler to this chain that inserts the given handler chain with the given service addition.
|
<T> Chain |
Chain.register(Class<? super T> type,
T service,
Handler handler)
Adds a handler that inserts the given handlers with the given service addition.
|
Chain |
Chain.register(Object service,
Action<? super Chain> action)
Adds a handler to this chain that inserts the given handler with the given service addition.
|
Chain |
Chain.register(Object service,
Handler handler)
Adds a handler that inserts the given handler with the given service addition.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
ChainAction.execute(Chain chain)
Adds to the given chain.
|
Modifier and Type | Method and Description |
---|---|
Handler |
Chain.chain(Action<? super Chain> action)
Constructs a handler using the given action to define a chain.
|
static Handler |
Handlers.chain(LaunchConfig launchConfig,
Action<? super Chain> action)
Builds a handler chain, with no backing registry.
|
static Handler |
Handlers.chain(LaunchConfig launchConfig,
Registry registry,
Action<? super Chain> action)
Builds a chain, backed by the given registry.
|
Chain |
Chain.fileSystem(String path,
Action<? super Chain> action)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler chain. |
Chain |
Chain.prefix(String prefix,
Action<? super Chain> action)
Adds a handler that delegates to the given handlers if the
relative path starts with the given
prefix . |
<T> Chain |
Chain.register(Class<? super T> type,
T service,
Action<? super Chain> action)
Adds a handler to this chain that inserts the given handler chain with the given service addition.
|
Chain |
Chain.register(Object service,
Action<? super Chain> action)
Adds a handler to this chain that inserts the given handler with the given service addition.
|