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.groovy.test | |
ratpack.guice |
Integration with Google Guice.
|
ratpack.handling |
The handling of application requests.
|
ratpack.test | |
ratpack.test.handling |
Modifier and Type | Method and Description |
---|---|
static Action<Chain> |
Groovy.chain(Closure<?> closure)
Creates a chain action implementation from the given closure.
|
Modifier and Type | Method and Description |
---|---|
static void |
Groovy.chain(Chain chain,
Closure<?> closure)
|
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)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler chain. |
GroovyChain |
GroovyChainAction.fileSystem(String path,
Action<? super Chain> action) |
GroovyChain |
GroovyChain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
GroovyChain |
GroovyChainAction.insert(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) |
GroovyChain |
GroovyChain.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> chainAction)
Adds a handler that inserts the given handler chain with a registry built by the given action via
Context.insert(ratpack.registry.Registry, Handler...) . |
GroovyChain |
GroovyChainAction.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> chainAction) |
GroovyChain |
GroovyChain.register(Registry registry,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
GroovyChain |
GroovyChainAction.register(Registry registry,
Action<? super Chain> action) |
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
GroovyUnitTest.handle(Action<? super Chain> handlers,
Closure<?> closure)
Unit test a chain of
handlers . |
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 | Class and Description |
---|---|
class |
ChainAction
Convenient super class for packaging up Groovy handler chain logic.
|
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 |
ChainAction.assets(String path,
String... indexFiles) |
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 |
ChainAction.delete(Handler handler) |
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 |
ChainAction.delete(String path,
Handler handler) |
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 |
ChainAction.fileSystem(String path,
Action<? super Chain> action) |
Chain |
Chain.fileSystem(String path,
Handler handler)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler. |
Chain |
ChainAction.fileSystem(String path,
Handler 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 |
ChainAction.get(Handler handler) |
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 |
ChainAction.get(String path,
Handler handler) |
protected Chain |
ChainAction.getChain() |
Chain |
Chain.handler(Handler handler)
Adds the given handler to this.
|
Chain |
ChainAction.handler(Handler handler) |
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 |
ChainAction.handler(String path,
Handler handler) |
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 |
ChainAction.header(String headerName,
String headerValue,
Handler handler) |
Chain |
Chain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
Chain |
ChainAction.insert(Action<? super Chain> action) |
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 |
ChainAction.patch(Handler handler) |
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 |
ChainAction.patch(String path,
Handler handler) |
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 |
ChainAction.post(Handler handler) |
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 |
ChainAction.post(String path,
Handler handler) |
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 |
ChainAction.prefix(String prefix,
Action<? super Chain> action) |
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 |
ChainAction.prefix(String prefix,
Handler handler) |
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 |
ChainAction.put(Handler handler) |
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 . |
Chain |
ChainAction.put(String path,
Handler handler) |
Chain |
Chain.register(Action<? super RegistrySpec> action)
Builds a new registry via the given action, then registers it via
register(Registry) |
Chain |
ChainAction.register(Action<? super RegistrySpec> action) |
Chain |
Chain.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with a registry built by the given action via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> action) |
Chain |
Chain.register(Action<? super RegistrySpec> registryAction,
Handler handler)
Adds a handler that inserts the given handler with the a registry built by the given action via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Action<? super RegistrySpec> registryAction,
Handler handler) |
Chain |
Chain.register(Registry registry)
Makes the contents of the given registry available for downstream handlers of the same nesting level.
|
Chain |
ChainAction.register(Registry registry) |
Chain |
Chain.register(Registry registry,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Registry registry,
Action<? super Chain> action) |
Chain |
Chain.register(Registry registry,
Handler handler)
Adds a handler that inserts the given handler with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Registry registry,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
void |
ChainAction.execute(Chain chain)
Delegates to
ChainAction.execute() , using the given chain for delegation. |
Modifier and Type | Method and Description |
---|---|
Handler |
Chain.chain(Action<? super Chain> action)
Constructs a handler using the given action to define a chain.
|
Handler |
ChainAction.chain(Action<? super Chain> action) |
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 |
ChainAction.fileSystem(String path,
Action<? super Chain> action) |
Chain |
Chain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
Chain |
ChainAction.insert(Action<? super Chain> action) |
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 |
ChainAction.prefix(String prefix,
Action<? super Chain> action) |
Chain |
Chain.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with a registry built by the given action via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Action<? super RegistrySpec> registryAction,
Action<? super Chain> action) |
Chain |
Chain.register(Registry registry,
Action<? super Chain> action)
Adds a handler that inserts the given handler chain with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
Chain |
ChainAction.register(Registry registry,
Action<? super Chain> action) |
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
UnitTest.handle(Action<? super Chain> chainAction,
Action<? super RequestFixture> requestFixtureAction)
Unit test a
Handler chain. |
Modifier and Type | Method and Description |
---|---|
HandlingResult |
RequestFixture.handle(Action<? super Chain> chainAction)
Similar to
RequestFixture.handle(ratpack.handling.Handler) , but for testing a handler chain. |
HandlingResult |
RequestFixtureAction.handle(Action<? super Chain> chainAction)
Similar to
RequestFixture.handle(ratpack.handling.Handler) , but for testing a handler chain. |