Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.func |
General functional (i.e.
|
ratpack.guice |
Integration with Google Guice.
|
ratpack.stream | |
ratpack.test.embed |
Support for creating embedded applications at test time, for testing Ratpack features and extensions.
|
ratpack.test.exec | |
ratpack.websocket |
Support for Websockets.
|
Modifier and Type | Method and Description |
---|---|
<O> Promise<O> |
PromiseOperations.blockingMap(Function<? super T,? extends O> transformer)
Like
PromiseOperations.map(Function) , but performs the transformation on a blocking thread. |
<O> Promise<O> |
PromiseOperations.flatMap(Function<? super T,? extends Promise<O>> transformer)
Transforms the promised value by applying the given function to it that returns a promise for the transformed value.
|
<O> Promise<O> |
PromiseOperations.map(Function<? super T,? extends O> transformer)
Transforms the promised value by applying the given function to it.
|
Modifier and Type | Method and Description |
---|---|
default <T> Function<I,T> |
Function.andThen(Function<? super O,? extends T> after)
Joins
this function with the given function. |
default <T> Function<T,O> |
Function.compose(Function<? super T,? extends I> before)
Joins the given function with
this function. |
static <I,O> Function<I,O> |
Function.from(Function<I,O> function)
Creates a function of this type from a JDK style function.
|
static <L,P extends Pair<L,?>> |
Pair.unpackLeft()
Convenience function for returning the left item of a pair.
|
static <R,P extends Pair<?,R>> |
Pair.unpackRight()
Convenience function for returning the right item of a pair.
|
Modifier and Type | Method and Description |
---|---|
default <T> Function<I,T> |
Function.andThen(Function<? super O,? extends T> after)
Joins
this function with the given function. |
default <T> Function<T,O> |
Function.compose(Function<? super T,? extends I> before)
Joins the given function with
this function. |
<T> T |
Pair.map(Function<? super Pair<L,R>,? extends T> function)
Applies the given function to
this , returning the result. |
<T> Pair<T,R> |
Pair.mapLeft(Function<? super L,? extends T> function)
Creates a new pair, with the left item being the result of applying the given function to the left item of
this . |
<T> Pair<L,T> |
Pair.mapRight(Function<? super R,? extends T> function)
Creates a new pair, with the right item being the result of applying the given function to the right item of
this . |
Modifier and Type | Method and Description |
---|---|
static Function<Module,Injector> |
Guice.newInjectorFactory(LaunchConfig launchConfig)
Creates a transformer that can build an injector from a module.
|
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) |
Handler |
GuiceBackedHandlerFactory.create(Action<? super BindingsSpec> modulesAction,
Function<? super Module,? extends Injector> moduleTransformer,
Function<? super Injector,? extends Handler> handler) |
Modifier and Type | Method and Description |
---|---|
static <I,O> org.reactivestreams.Publisher<O> |
Streams.flatMap(org.reactivestreams.Publisher<I> input,
Function<? super I,? extends Promise<? extends O>> function)
Returns a publisher that publishes items from the given input publisher after transforming each item via the given, promise returning, function.
|
static <I,O> org.reactivestreams.Publisher<O> |
Streams.map(org.reactivestreams.Publisher<I> input,
Function<? super I,? extends O> function)
Returns a publisher that publishes items from the given input publisher after transforming each item via the given function.
|
static <T> org.reactivestreams.Publisher<T> |
Streams.periodically(LaunchConfig launchConfig,
long delay,
TimeUnit timeUnit,
Function<Integer,T> producer) |
static <T> org.reactivestreams.Publisher<T> |
Streams.periodically(ScheduledExecutorService executorService,
long delay,
TimeUnit timeUnit,
Function<Integer,T> producer)
Executes the given function periodically, publishing the return value to the subscriber.
|
static <T> org.reactivestreams.Publisher<T> |
Streams.yield(Function<? super YieldRequest,T> producer)
Creates a new publisher, backed by the given data producing function.
|
Modifier and Type | Method and Description |
---|---|
static EmbeddedApp |
EmbeddedApp.fromLaunchConfigBuilder(Function<? super LaunchConfigBuilder,? extends LaunchConfig> function)
Creates an embedded application by building a
LaunchConfig . |
static EmbeddedApp |
EmbeddedApp.fromLaunchConfigBuilder(Path baseDir,
Function<? super LaunchConfigBuilder,? extends LaunchConfig> function)
Creates an embedded application by building a
LaunchConfig with the given base dir. |
Modifier and Type | Method and Description |
---|---|
<T> ExecResult<T> |
ExecHarness.yield(Function<ExecControl,Promise<T>> func)
Synchronously returns a promised value.
|
static <T> ExecResult<T> |
ExecHarness.yieldSingle(Function<ExecControl,Promise<T>> func)
Creates an exec harness,
executes the given function with it before closing it, then returning execution result. |
Modifier and Type | Method and Description |
---|---|
static <T> WebSocketConnector<T> |
WebSockets.websocket(Context context,
Function<WebSocket,T> openAction) |