Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.func |
General functional (i.e.
|
ratpack.groovy |
Support for writing Ratpack applications in the Groovy programming language.
|
ratpack.groovy.guice |
Groovy specific extensions to the Guice support.
|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
ratpack.groovy.test | |
ratpack.groovy.test.handling | |
ratpack.guice |
Integration with Google Guice.
|
ratpack.handling |
The handling of application requests.
|
ratpack.handling.direct |
Low level direct access to the underlying Netty internals.
|
ratpack.http.client | |
ratpack.registry |
Registries hold objects that can be retrieved via type, and are a key aspect of Ratpack applications.
|
ratpack.stream | |
ratpack.test | |
ratpack.test.embed |
Support for creating embedded applications at test time, for testing Ratpack features and extensions.
|
ratpack.test.handling | |
ratpack.test.http | |
ratpack.websocket |
Support for Websockets.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Fulfillment<T>
Convenience type for
Action<Fulfiller<T>> implementations. |
Modifier and Type | Method and Description |
---|---|
void |
ExecControl.addInterceptor(ExecInterceptor execInterceptor,
Action<? super Execution> continuation)
Adds an interceptor that wraps the rest of the current execution segment and all future segments of this execution.
|
void |
ExecControl.fork(Action<? super Execution> action)
Forks a new execution on a separate thread.
|
void |
ExecControl.fork(Action<? super Execution> action,
Action<? super Throwable> onError) |
void |
ExecControl.fork(Action<? super Execution> action,
Action<? super Throwable> onError) |
void |
ExecControl.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
void |
ExecControl.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
void |
ExecControl.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
SuccessPromise<T> |
Promise.onError(Action<? super Throwable> errorHandler)
Specifies the action to take if the an error occurs trying to produce the promised value.
|
<T> Promise<T> |
ExecControl.promise(Action<? super Fulfiller<T>> action)
Creates a promise for an asynchronously created value.
|
Promise<T> |
PromiseOperations.route(Predicate<? super T> predicate,
Action<? super T> action) |
void |
Promise.then(Action<? super T> then)
Specifies what should be done with the promised object when it becomes available.
|
void |
SuccessPromise.then(Action<? super T> then)
Specifies what should be done with the promised object when it becomes available.
|
Modifier and Type | Method and Description |
---|---|
static <T> Action<T> |
Action.from(Consumer<T> consumer)
Creates an action from a JDK consumer.
|
static <T> Action<T> |
Action.ignoreArg(NoArgAction noArgAction) |
static <T> Action<T> |
Action.join(Action<? super T>... actions)
Returns a new action that executes the given actions in order.
|
static Action<Object> |
Action.noop()
Returns an action that does precisely nothing.
|
static <T> Action<? super T> |
Action.noopIfNull(Action<T> action)
If the given action is
null , returns noop() , otherwise returns the given action. |
static Action<Throwable> |
Action.throwException()
Returns an action that receives a throwable and immediately throws it.
|
static <T> Action<T> |
Action.throwException(Throwable throwable)
Returns an action that immediately throws the given exception.
|
Modifier and Type | Method and Description |
---|---|
static <T> Action<T> |
Action.join(Action<? super T>... actions)
Returns a new action that executes the given actions in order.
|
static <T> Action<? super T> |
Action.noopIfNull(Action<T> action)
If the given action is
null , returns noop() , otherwise returns the given action. |
static <T> T |
Action.with(T t,
Action<? super T> action)
Executes the action with the given argument, then returns the argument.
|
Modifier and Type | Method and Description |
---|---|
static Action<Chain> |
Groovy.chain(Closure<?> closure)
Creates a chain action implementation from the given closure.
|
static Action<Chain> |
Groovy.chainAction(Closure<?> closure)
Creates a chain action based on the given closure.
|
Modifier and Type | Method and Description |
---|---|
static MarkupTemplate |
Groovy.groovyMarkupTemplate(String id,
Action<? super ImmutableMap.Builder<String,Object>> modelBuilder)
Creates a
renderable Groovy based markup template, using the default content type. |
static MarkupTemplate |
Groovy.groovyMarkupTemplate(String id,
String type,
Action<? super ImmutableMap.Builder<String,Object>> modelBuilder)
Creates a
renderable Groovy based markup template. |
Modifier and Type | Method and Description |
---|---|
GroovyBindingsSpec |
GroovyBindingsSpec.binder(Action<? super Binder> action)
Adds bindings by directly configuring a
Binder . |
GroovyBindingsSpec |
GroovyBindingsSpec.init(Action<? super Injector> action)
Registers an action to operate on the injector when it has been finalized.
|
Modifier and Type | Method and Description |
---|---|
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 |
GroovyChain.host(String hostName,
Action<? super Chain> action)
Adds a handler to the chain that delegates to the given handler chain if the request has a
Host header that matches the given value exactly. |
GroovyChain |
GroovyChain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
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 |
GroovyChain.register(Action<? super RegistrySpec> action)
Builds a new registry via the given action, then registers it via
Chain.register(Registry) . |
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 |
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 |
GroovyChain.register(Action<? super RegistrySpec> registryAction,
Closure<?> handler) |
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...) . |
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 |
---|---|
GroovyRequestFixture |
GroovyRequestFixture.launchConfig(Action<? super LaunchConfigBuilder> action) |
GroovyRequestFixture |
GroovyRequestFixture.launchConfig(Path baseDir,
Action<? super LaunchConfigBuilder> action) |
GroovyRequestFixture |
GroovyRequestFixture.registry(Action<? super RegistrySpec> action) |
Modifier and Type | Method and Description |
---|---|
BindingsSpec |
BindingsSpec.binder(Action<? super Binder> action)
Adds bindings by directly configuring a
Binder . |
Guice.Builder |
Guice.Builder.bindings(Action<? super BindingsSpec> action) |
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) |
BindingsSpec |
BindingsSpec.init(Action<? super Injector> action)
Registers an action to operate on the injector when it has been finalized.
|
Modifier and Type | Method and Description |
---|---|
void |
Context.addInterceptor(ExecInterceptor execInterceptor,
Action<? super Execution> continuation) |
void |
Context.byContent(Action<? super ByContentSpec> action)
Respond to the request based on the requested content type (i.e.
|
void |
Context.byMethod(Action<? super ByMethodSpec> action)
Respond to the request based on the request method.
|
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. |
void |
Context.fork(Action<? super Execution> action)
Forks a new execution, detached from the current.
|
void |
Context.fork(Action<? super Execution> action,
Action<? super Throwable> onError) |
void |
Context.fork(Action<? super Execution> action,
Action<? super Throwable> onError) |
void |
Context.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
void |
Context.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
void |
Context.fork(Action<? super Execution> action,
Action<? super Throwable> onError,
Action<? super Execution> onComplete) |
Chain |
Chain.host(String hostName,
Action<? super Chain> action)
Adds a handler to the chain that delegates to the given handler chain if the request has a
Host header that matches the given value exactly. |
Chain |
Chain.insert(Action<? super Chain> action)
Inserts the given nested handler chain.
|
void |
Context.onClose(Action<? super RequestOutcome> onClose)
Registers a callback to be notified when the request for this context is “closed” (i.e.
|
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> Promise<T> |
Context.promise(Action<? super Fulfiller<T>> action)
Creates a promise of a value that will made available asynchronously.
|
Chain |
Chain.register(Action<? super RegistrySpec> action)
Builds a new registry via the given action, then registers it via
Chain.register(Registry) . |
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 |
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 |
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...) . |
Modifier and Type | Method and Description |
---|---|
void |
DirectChannelAccess.takeOwnership(Action<Object> messageReceiver)
Signals that Ratpack should no longer manage this channel.
|
Modifier and Type | Method and Description |
---|---|
RequestSpec |
RequestSpec.body(Action<? super RequestSpec.Body> action)
Executes the given action with the
request body . |
Promise<ReceivedResponse> |
HttpClient.get(Action<? super RequestSpec> action)
An asynchronous method to do a GET HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a GET.
|
RequestSpec |
RequestSpec.headers(Action<? super MutableHeaders> action)
This method can be used to compose changes to the headers.
|
Promise<ReceivedResponse> |
HttpClient.post(Action<? super RequestSpec> action)
An asynchronous method to do a POST HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a POST.
|
Promise<ReceivedResponse> |
HttpClient.request(Action<? super RequestSpec> action)
An asynchronous method to do a HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec.
|
RequestSpec.Body |
RequestSpec.Body.stream(Action<? super OutputStream> action)
Specifies the request body by writing to an output stream.
|
RequestSpec |
RequestSpec.url(Action<? super HttpUrlSpec> action) |
Modifier and Type | Method and Description |
---|---|
<T> boolean |
Registry.each(TypeToken<T> type,
Predicate<? super T> predicate,
Action<? super T> action)
Calls the given action with each object whose declared type is assignment compatible with the given type and who satisfies the given predicate.
|
static Registry |
Registries.registry(Action<? super RegistrySpec> action)
Builds a registry from the given action.
|
Modifier and Type | Method and Description |
---|---|
static <T> org.reactivestreams.Publisher<T> |
Streams.gate(org.reactivestreams.Publisher<T> publisher,
Action<? super Runnable> valveReceiver)
Allows requests from the subscriber of the return publisher to be withheld from the given publisher until an externally defined moment.
|
static <T> org.reactivestreams.Publisher<T> |
Streams.wiretap(org.reactivestreams.Publisher<T> publisher,
Action<? super StreamEvent<? super T>> listener)
Allows listening to the events of the given publisher as they flow to subscribers.
|
Modifier and Type | Method and Description |
---|---|
static HandlingResult |
UnitTest.handle(Action<? super Chain> chainAction,
Action<? super RequestFixture> requestFixtureAction)
Unit test a
Handler chain. |
static HandlingResult |
UnitTest.handle(Action<? super Chain> chainAction,
Action<? super RequestFixture> requestFixtureAction)
Unit test a
Handler chain. |
static HandlingResult |
UnitTest.handle(Handler handler,
Action<? super RequestFixture> action)
Unit test a single
Handler . |
Modifier and Type | Method and Description |
---|---|
static EmbeddedApp |
EmbeddedApp.fromChain(Action<? super Chain> action)
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler chain.
|
Modifier and Type | Method and Description |
---|---|
HandlingResult |
RequestFixture.handleChain(Action<? super Chain> chainAction)
Similar to
RequestFixture.handle(ratpack.handling.Handler) , but for testing a handler chain. |
RequestFixture |
RequestFixture.launchConfig(Action<? super LaunchConfigBuilder> action)
Configures the launch config to have no base dir and given configuration.
|
RequestFixture |
RequestFixture.launchConfig(Path baseDir,
Action<? super LaunchConfigBuilder> action)
Configures the launch config to have the given base dir and given configuration.
|
RequestFixture |
RequestFixture.registry(Action<? super RegistrySpec> action)
Configures the context registry.
|
Modifier and Type | Method and Description |
---|---|
void |
TestHttpClient.requestSpec(Action<? super RequestSpec> requestAction) |
static TestHttpClient |
TestHttpClients.testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer) |
Modifier and Type | Method and Description |
---|---|
void |
WebSocketConnector.connect(Action<? super WebSocketSpec<T>> specAction) |
WebSocketSpec<T> |
WebSocketSpec.onClose(Action<WebSocketClose<T>> action) |
WebSocketSpec<T> |
WebSocketSpec.onMessage(Action<WebSocketMessage<T>> action) |