Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.func |
General functional (i.e. Single Abstract Method) types.
|
ratpack.groovy.handling |
Groovy specific extensions to classes in the
ratpack.handling package. |
ratpack.handling |
The handling of application requests.
|
ratpack.stream |
Support for reactive streams.
|
Modifier and Type | Method and Description |
---|---|
default Promise<T> |
Promise.onError(Predicate<? super Throwable> predicate,
Action<? super Throwable> errorHandler)
Specifies the action to take if the an error occurs trying to produce the promised value, that the given predicate applies to.
|
default Promise<T> |
Promise.route(Predicate<? super T> predicate,
Action<? super T> action)
Allows the promised value to be handled specially if it meets the given predicate, instead of being handled by the promise subscriber.
|
Modifier and Type | Field and Description |
---|---|
static Predicate<Object> |
Predicate.FALSE
A predicate that always returns
false , regardless of the input object. |
static Predicate<Object> |
Predicate.TRUE
A predicate that always returns
true , regardless of the input object. |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicate.alwaysFalse()
A predicate that always returns
false , regardless of the input object. |
static <T> Predicate<T> |
Predicate.alwaysTrue()
A predicate that always returns
true , regardless of the input object. |
static <T> Predicate<T> |
Predicate.from(Predicate<T> predicate)
Creates a predicate from a JDK predicate.
|
static <T> Predicate<T> |
Predicate.fromGuava(Predicate<T> predicate)
Creates a predicate from a Guava predicate.
|
Modifier and Type | Method and Description |
---|---|
default GroovyChain |
GroovyChain.onlyIf(Predicate<? super Context> test,
Class<? extends Handler> handler) |
default GroovyChain |
GroovyChain.onlyIf(Predicate<? super Context> test,
Closure<?> handler) |
default GroovyChain |
GroovyChain.onlyIf(Predicate<? super Context> test,
Handler handler) |
default GroovyChain |
GroovyChain.when(Predicate<? super Context> test,
Action<? super Chain> action) |
default GroovyChain |
GroovyChain.when(Predicate<? super Context> test,
Class<? extends Action<? super Chain>> action) |
default GroovyChain |
GroovyChain.when(Predicate<? super Context> test,
Closure<?> handlers) |
Modifier and Type | Method and Description |
---|---|
default Chain |
Chain.onlyIf(Predicate<? super Context> test,
Class<? extends Handler> handler) |
default Chain |
Chain.onlyIf(Predicate<? super Context> test,
Handler handler)
Invokes the given handler only if the predicate passes.
|
static Handler |
Handlers.onlyIf(Predicate<? super Context> test,
Handler handler)
Creates a handler that delegates to the given handler if the predicate applies to the context.
|
default Chain |
Chain.when(Predicate<? super Context> test,
Action<? super Chain> action) |
default Chain |
Chain.when(Predicate<? super Context> test,
Class<? extends Action<? super Chain>> action) |
static Handler |
Handlers.when(Predicate<? super Context> test,
Handler handler)
Creates a handler that inserts and delegates the given handler if the predicate applies to the context.
|
Modifier and Type | Method and Description |
---|---|
default TransformablePublisher<T> |
TransformablePublisher.filter(Predicate<? super T> filter)
|
static <T> TransformablePublisher<T> |
Streams.filter(Publisher<T> input,
Predicate<? super T> filter)
Returns a publisher that filters items from the given input stream by applying the given filter predicate.
|