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.handling | |
ratpack.guice |
Integration with Google Guice.
|
ratpack.handling |
The handling of application requests.
|
ratpack.hystrix |
Provides integration with the Hystrix library.
|
ratpack.launch |
Classes used to bootstrap a Ratpack application.
|
ratpack.newrelic | |
ratpack.pac4j |
Integration with pac4j for authentication/authorization.
|
ratpack.remote |
Integration with Groovy Remote Control.
|
ratpack.session | |
ratpack.session.clientside | |
ratpack.session.store |
Session scoped storage.
|
ratpack.test.embed |
Support for creating embedded applications at test time, for testing Ratpack features and extensions.
|
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 | Class and Description |
---|---|
class |
GroovyHandler
A handler subclass that makes a
GroovyContext available. |
Modifier and Type | Method and Description |
---|---|
Handler |
GroovyChain.chain(Closure<?> closure)
Creates a handler from the given 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 |
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 |
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 |
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 |
GroovyChain.handler(Handler handler)
Adds the given handler to this.
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 . |
Modifier and Type | Method and Description |
---|---|
default GroovyChain |
GroovyChain.delete(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.delete(String path,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.get(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.get(String path,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.handler(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.handler(String path,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.header(String headerName,
String headerValue,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.patch(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.patch(String path,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.post(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.post(String path,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.put(Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.put(String path,
Class<? extends Handler> handler) |
Modifier and Type | Method and Description |
---|---|
Handler |
GroovyScriptFileHandlerFactory.create(LaunchConfig launchConfig) |
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
GroovyRequestFixture.handle(Handler handler,
Closure<?> closure)
Unit test a
Handler . |
Modifier and Type | Method and Description |
---|---|
Handler |
Guice.Builder.build(Action<? super Chain> action) |
Handler |
GuiceBackedHandlerFactory.create(Action<? super BindingsSpec> modulesAction,
Function<? super Module,? extends Injector> moduleTransformer,
Function<? super Injector,? extends Handler> handler) |
Handler |
HandlerDecoratingModule.decorate(Injector injector,
Handler handler)
Decorate the given handler with any global logic.
|
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 BindingsSpec> modulesAction,
Function<? super Module,? extends Injector> moduleTransformer,
Function<? super Injector,? extends Handler> handler) |
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.
|
default Handler |
Chain.chain(Class<? extends 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.host(String hostName,
Handler handler)
Creates a handler that delegates to the given handler if the
request has a HTTPHost with the
given name that 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.redirect(int code,
String location)
Creates a handler that always issues a redirect using
Context.redirect(int, String) with exactly the given code and location. |
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 |
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 . |
static Handler |
Handlers.fileSystem(LaunchConfig launchConfig,
String path,
Handler handler)
A handlers that changes the
FileSystemBinding for the given handlers. |
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.
|
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.host(String hostName,
Handler handler)
Creates a handler that delegates to the given handler if the
request has a HTTPHost with the
given name that 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 |
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 . |
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 |
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 . |
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 |
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 . |
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(List<? extends Handler> handlers)
Creates a handler chain from the given handlers.
|
default Chain |
Chain.delete(Class<? extends Handler> handler) |
default Chain |
Chain.delete(String path,
Class<? extends Handler> handler) |
default Chain |
Chain.get(Class<? extends Handler> handler) |
default Chain |
Chain.get(String path,
Class<? extends Handler> handler) |
default Chain |
Chain.handler(Class<? extends Handler> handler) |
default Chain |
Chain.handler(String path,
Class<? extends Handler> handler) |
default Chain |
Chain.header(String headerName,
String headerValue,
Class<? extends Handler> handler) |
default Chain |
Chain.patch(Class<? extends Handler> handler) |
default Chain |
Chain.patch(String path,
Class<? extends Handler> handler) |
default Chain |
Chain.post(Class<? extends Handler> handler) |
default Chain |
Chain.post(String path,
Class<? extends Handler> handler) |
default Chain |
Chain.put(Class<? extends Handler> handler) |
default Chain |
Chain.put(String path,
Class<? extends Handler> handler) |
Modifier and Type | Class and Description |
---|---|
class |
HystrixMetricsEventStreamHandler
A Handler that streams Hystrix metrics in text/event-stream format.
|
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 |
Pac4jCallbackHandlerBuilder.build() |
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 |
ClientSideSessionsModule.decorate(Injector injector,
Handler handler)
Makes
SessionStorage available in the context registry. |
Modifier and Type | Method and Description |
---|---|
Handler |
ClientSideSessionsModule.decorate(Injector injector,
Handler handler)
Makes
SessionStorage available in the context registry. |
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 EmbeddedApp |
EmbeddedApp.fromHandler(Handler handler)
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler.
|
static EmbeddedApp |
EmbeddedApp.fromHandler(Path baseDir,
Handler handler)
Creates an embedded application with a default launch config (ephemeral port) and the given 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. |
static HandlingResult |
RequestFixture.handle(Handler handler,
Action<? super RequestFixture> action)
Unit test a single
Handler . |