Package | Description |
---|---|
ratpack.codahale.metrics |
Integration with Coda Hale's Metrics Library.
|
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.launch | |
ratpack.groovy.test | |
ratpack.groovy.test.embed |
Support for creating Groovy based embedded applications.
|
ratpack.guice |
Integration with Google Guice.
|
ratpack.handling |
The handling of application requests.
|
ratpack.launch |
Classes used to bootstrap a Ratpack application.
|
ratpack.newrelic | |
ratpack.remote |
Integration with Groovy Remote Control.
|
ratpack.session | |
ratpack.session.store |
Session scoped storage.
|
ratpack.test | |
ratpack.test.handling |
Modifier and Type | Class and Description |
---|---|
class |
HealthCheckHandler
A Handler that runs and renders health checks.
|
class |
MetricsWebsocketBroadcastHandler
A Handler that broadcasts metric reports via web sockets.
|
Modifier and Type | Method and Description |
---|---|
Handler |
CodaHaleMetricsModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
CodaHaleMetricsModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
static Handler |
Groovy.chain(LaunchConfig launchConfig,
Closure<?> closure)
Builds a handler chain, with no backing registry.
|
static Handler |
Groovy.chain(LaunchConfig launchConfig,
Registry registry,
Closure<?> closure)
Builds a chain, backed by the given registry.
|
static Handler |
Groovy.groovyHandler(Closure<?> closure)
Creates a handler instance from a closure.
|
Modifier and Type | Interface and Description |
---|---|
interface |
GroovyByContentHandler
Closure overloads of methods from
ByContentHandler . |
interface |
GroovyByMethodHandler
A Groovy specific subclass of
ByMethodHandler that makes using closures more convenient. |
Modifier and Type | Class and Description |
---|---|
class |
GroovyHandler
A handler subclass that makes a
GroovyContext available. |
Modifier and Type | Method and Description |
---|---|
Handler |
GroovyChainAction.chain(Action<? super Chain> action) |
Handler |
GroovyChain.chain(Closure<?> closure)
Creates a handler from the given closure.
|
Handler |
GroovyChainAction.chain(Closure<?> closure) |
Modifier and Type | Method and Description |
---|---|
GroovyChain |
GroovyChain.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. |
GroovyChain |
GroovyChainAction.delete(Handler handler) |
GroovyChain |
GroovyChain.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 . |
GroovyChain |
GroovyChainAction.delete(String path,
Handler handler) |
GroovyChain |
GroovyChain.fileSystem(String path,
Handler handler)
Adds a handler to this chain that changes the
FileSystemBinding for the given handler. |
GroovyChain |
GroovyChainAction.fileSystem(String path,
Handler handler) |
GroovyChain |
GroovyChain.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. |
GroovyChain |
GroovyChainAction.get(Handler handler) |
GroovyChain |
GroovyChain.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 . |
GroovyChain |
GroovyChainAction.get(String path,
Handler handler) |
GroovyChain |
GroovyChain.handler(Handler handler)
Adds the given handler to this.
|
GroovyChain |
GroovyChainAction.handler(Handler handler) |
GroovyChain |
GroovyChain.handler(String path,
Handler handler)
Adds a handler that delegates to the given handler if the relative
path
matches the given path exactly. |
GroovyChain |
GroovyChainAction.handler(String path,
Handler handler) |
GroovyChain |
GroovyChain.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.
|
GroovyChain |
GroovyChainAction.header(String headerName,
String headerValue,
Handler handler) |
GroovyChain |
GroovyChain.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. |
GroovyChain |
GroovyChainAction.patch(Handler handler) |
GroovyChain |
GroovyChain.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 . |
GroovyChain |
GroovyChainAction.patch(String path,
Handler handler) |
GroovyChain |
GroovyChain.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. |
GroovyChain |
GroovyChainAction.post(Handler handler) |
GroovyChain |
GroovyChain.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 . |
GroovyChain |
GroovyChainAction.post(String path,
Handler handler) |
GroovyChain |
GroovyChain.prefix(String prefix,
Handler handler)
Adds a handler that delegates to the given handler if the relative path starts with the given
prefix . |
GroovyChain |
GroovyChainAction.prefix(String prefix,
Handler handler) |
GroovyChain |
GroovyChain.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. |
GroovyChain |
GroovyChainAction.put(Handler handler) |
GroovyChain |
GroovyChain.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 . |
GroovyChain |
GroovyChainAction.put(String path,
Handler handler) |
GroovyChain |
GroovyChain.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...) . |
GroovyChain |
GroovyChainAction.register(Action<? super RegistrySpec> registryAction,
Handler handler) |
GroovyChain |
GroovyChain.register(Registry registry,
Handler handler)
Adds a handler that inserts the given handler with the given registry via
Context.insert(ratpack.registry.Registry, Handler...) . |
GroovyChain |
GroovyChainAction.register(Registry registry,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
GroovyScriptFileHandlerFactory.create(LaunchConfig launchConfig) |
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
GroovyUnitTest.handle(Handler handler,
Closure<?> closure)
Unit test a
Handler . |
Modifier and Type | Method and Description |
---|---|
protected Transformer<? super Injector,? extends Handler> |
ClosureBackedEmbeddedApplication.createHandlerTransformer(LaunchConfig launchConfig)
Provides the object that, given the
Injector created by the module definition, creates the application handler. |
Modifier and Type | Method and Description |
---|---|
Handler |
GuiceBackedHandlerFactory.create(Action<? super ModuleRegistry> modulesAction,
Transformer<? super Module,? extends Injector> moduleTransformer,
Transformer<? super Injector,? extends Handler> handler) |
Handler |
HandlerDecoratingModule.decorate(Injector injector,
Handler handler)
Decorate the given handler with any global logic.
|
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,
Action<? super ModuleRegistry> moduleConfigurer,
Transformer<? super Injector,? extends Handler> injectorTransformer)
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.
|
static Handler |
Guice.handler(LaunchConfig launchConfig,
Injector parentInjector,
Action<? super ModuleRegistry> moduleConfigurer,
Transformer<? super Injector,? extends Handler> injectorTransformer)
Creates a handler that can be used as the entry point for a Guice backed Ratpack app.
|
Modifier and Type | Method and Description |
---|---|
Handler |
HandlerDecoratingModule.decorate(Injector injector,
Handler handler)
Decorate the given handler with any global logic.
|
Modifier and Type | Method and Description |
---|---|
Handler |
GuiceBackedHandlerFactory.create(Action<? super ModuleRegistry> modulesAction,
Transformer<? super Module,? extends Injector> moduleTransformer,
Transformer<? super Injector,? extends Handler> handler) |
static Handler |
Guice.handler(LaunchConfig launchConfig,
Action<? super ModuleRegistry> moduleConfigurer,
Transformer<? super Injector,? extends Handler> injectorTransformer)
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,
Transformer<? super Injector,? extends Handler> injectorTransformer)
Creates a handler that can be used as the entry point for a Guice backed Ratpack app.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ByContentHandler
A buildable strategy for responding based on the HTTP "Accepts" request header.
|
interface |
ByMethodHandler
A buildable strategy for processing an exchange based on HTTP method.
|
Modifier and Type | Class and Description |
---|---|
class |
InjectionHandler
A super class that removes the boiler plate of retrieving objects from the context registry by injecting them based on a method signature.
|
Modifier and Type | Method and Description |
---|---|
static Handler |
Handlers.accepts(String... contentTypes)
A handler that delegates to the next handler if the request claims that it can accept one of the given types, otherwise raises a 406 client error.
|
static Handler |
Handlers.assets(LaunchConfig launchConfig,
String path,
List<String> indexFiles)
A handler that serves static assets at the given file system path, relative to the contextual file system binding.
|
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(Handler... handlers)
Creates a handler chain from the given handlers.
|
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.
|
static Handler |
Handlers.chain(List<? extends Handler> handlers)
Creates a handler chain from the given handlers.
|
static Handler |
Handlers.clientError(int statusCode)
A handler that simply calls
Context.clientError(int) with the given status code. |
static Handler |
Handlers.contentTypes(String... contentTypes)
A handler that delegates to the next handler if the content type of the request is one of the given types, otherwise raises a 415 client error.
|
static Handler |
Handlers.delete()
A handler that delegates to the next handler if the request is DELETE, otherwise raises a 405 client error.
|
static Handler |
Handlers.fileSystem(LaunchConfig launchConfig,
String path,
Handler handler)
A handlers that changes the
FileSystemBinding for the given handlers. |
static Handler |
Handlers.get()
A handler that delegates to the next handler if the request is GET, otherwise raises a 405 client error.
|
static Handler |
Handlers.header(String headerName,
String headerValue,
Handler handler)
Creates a handler that delegates to the given handler if the
request has a HTTPHeader with the
given name and a it's value matches the given value exactly. |
static Handler |
Handlers.next()
A handler that simply delegates to the next handler.
|
static Handler |
Handlers.notFound()
Convenience for
clientError(404) . |
static Handler |
Handlers.patch()
A handler that delegates to the next handler if the request is PATCH, otherwise raises a 405 client error.
|
static Handler |
Handlers.path(PathBinder pathBinder,
Handler handler)
Creates a handler that delegates to the given handlers if the request can be bound by the given path binder.
|
static Handler |
Handlers.path(String path,
Handler handler)
Creates a handler that delegates to the given handlers if the request matches the given path exactly.
|
static Handler |
Handlers.post()
A handler that delegates to the next handler if the request is POST, otherwise raises a 405 client error.
|
static Handler |
Handlers.prefix(String prefix,
Handler handler)
Creates a handler that delegates to the given handlers if the request path starts with the given prefix.
|
static Handler |
Handlers.put()
A handler that delegates to the next handler if the request is PUT, otherwise raises a 405 client error.
|
static Handler |
Handlers.register(Registry registry)
A handler that simply calls
Context.next(Registry) with the given registry. |
static Handler |
Handlers.register(Registry registry,
Handler handler)
A handler that simply calls
Context.insert(Registry, Handler...) with the given registry and handler. |
Modifier and Type | Method and Description |
---|---|
static Handler |
Handlers.chain(Handler... handlers)
Creates a handler chain from the given handlers.
|
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) |
static Handler |
Handlers.fileSystem(LaunchConfig launchConfig,
String path,
Handler handler)
A handlers that changes the
FileSystemBinding for the given handlers. |
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) |
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) |
static Handler |
Handlers.header(String headerName,
String headerValue,
Handler handler)
Creates a handler that delegates to the given handler if the
request has a HTTPHeader with the
given name and a it's value matches the given value exactly. |
void |
Context.insert(Handler... handlers)
Inserts some handlers into the pipeline, then delegates to the first.
|
void |
Context.insert(Registry registry,
Handler... handlers)
Inserts some handlers into the pipeline to execute with the given registry, then delegates to the first.
|
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) |
static Handler |
Handlers.path(PathBinder pathBinder,
Handler handler)
Creates a handler that delegates to the given handlers if the request can be bound by the given path binder.
|
static Handler |
Handlers.path(String path,
Handler handler)
Creates a handler that delegates to the given handlers if the request matches the given path exactly.
|
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,
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) |
static Handler |
Handlers.prefix(String prefix,
Handler handler)
Creates a handler that delegates to the given handlers if the request 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 |
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> 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,
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) |
static Handler |
Handlers.register(Registry registry,
Handler handler)
A handler that simply calls
Context.insert(Registry, Handler...) with the given registry and handler. |
void |
Context.respond(Handler handler)
Convenience method for delegating to a single handler.
|
Modifier and Type | Method and Description |
---|---|
static Handler |
Handlers.chain(List<? extends Handler> handlers)
Creates a handler chain from the given handlers.
|
Modifier and Type | Method and Description |
---|---|
Handler |
HandlerFactory.create(LaunchConfig launchConfig)
Creates a handler from the given launch config.
|
Modifier and Type | Method and Description |
---|---|
Handler |
NewRelicModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
NewRelicModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
RemoteControlModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
RemoteControlModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
SessionModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
SessionModule.decorate(Injector injector,
Handler handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
MapSessionsModule.decorate(Injector injector,
Handler handler)
Makes
SessionStorage available in the exchange service. |
Modifier and Type | Method and Description |
---|---|
Handler |
MapSessionsModule.decorate(Injector injector,
Handler handler)
Makes
SessionStorage available in the exchange service. |
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
UnitTest.handle(Handler handler,
Action<? super RequestFixture> action)
Unit test a single
Handler . |
Modifier and Type | Method and Description |
---|---|
HandlingResult |
RequestFixture.handle(Handler handler)
Invokes the given handler with a newly created
Context based on the state of this fixture. |
HandlingResult |
RequestFixtureAction.handle(Handler handler)
Invokes the given handler with a newly created
Context based on the state of this fixture. |