Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.handling |
The handling of application requests.
|
ratpack.health |
Health checks report on the status of key components in the system and are generally used for monitoring and reporting.
|
ratpack.http.client |
The HTTP client.
|
ratpack.rx |
Provides integration with the RxJava library.
|
ratpack.sse |
Support for Server Sent Events.
|
ratpack.stream |
Support for reactive streams.
|
ratpack.test.exec |
Modifier and Type | Method and Description |
---|---|
<O> Promise<O> |
Promise.apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.
|
<T> Promise<T> |
ExecControl.blocking(Callable<T> blockingOperation)
Performs a blocking operation on a separate thread, returning a promise for its value.
|
<O> Promise<O> |
Promise.blockingMap(Function<? super T,? extends O> transformer)
Like
map(Function) , but performs the transformation on a blocking thread. |
Promise<T> |
Promise.cache()
Caches the promised value (or error) and returns it to all subscribers.
|
Promise<T> |
Promise.defer(Action<? super Runnable> releaser)
Allows the execution of the promise to be deferred to a later time.
|
default <T> Promise<T> |
ExecControl.failedPromise(Throwable error)
Creates a failed promise with the given error.
|
<O> Promise<O> |
Promise.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> |
Promise.map(Function<? super T,? extends O> transformer)
Transforms the promised value by applying the given function to it.
|
Promise<T> |
Promise.mapError(Function<? super Throwable,? extends T> transformer)
Transforms the promise failure (potentially into a value) by applying the given function to it.
|
Promise<T> |
Promise.onError(Action<? super Throwable> errorHandler)
Specifies the action to take if the an error occurs trying to produce the promised value.
|
Promise<T> |
Promise.onNull(NoArgAction action)
A convenience shorthand for
routing null values. |
Promise<T> |
Promise.onYield(Runnable onYield)
Registers a listener that is invoked when
this promise is initiated. |
<T> Promise<T> |
ExecControl.promise(Action<? super Fulfiller<T>> action)
Creates a promise for an asynchronously created value.
|
default <T> Promise<T> |
ExecControl.promiseOf(T item)
Creates a promise for the given value.
|
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.
|
<T> Promise<T> |
Throttle.throttle(Promise<T> promise)
Throttles the given promise.
|
Promise<T> |
Promise.throttled(Throttle throttle)
Throttles
this promise, using the given throttle . |
Promise<T> |
Promise.wiretap(Action<? super Result<T>> listener)
Registers a listener for the promise outcome.
|
Modifier and Type | Method and Description |
---|---|
<T> Promise<T> |
Throttle.throttle(Promise<T> promise)
Throttles the given promise.
|
Modifier and Type | Method and Description |
---|---|
<O> Promise<O> |
Promise.apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.
|
<O> Promise<O> |
Promise.apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.
|
<O> Promise<O> |
Promise.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> O |
Promise.to(Function<? super Promise<T>,? extends O> function)
Applies the given function to
this and returns the result. |
Modifier and Type | Method and Description |
---|---|
<T> Promise<T> |
Context.blocking(Callable<T> blockingOperation)
Executes a blocking operation, returning a promise for its result.
|
<T> Promise<T> |
Context.promise(Action<? super Fulfiller<T>> action)
Creates a promise of a value that will made available asynchronously.
|
Modifier and Type | Method and Description |
---|---|
Promise<HealthCheck.Result> |
HealthCheck.check(ExecControl execControl)
Checks the health of the component, providing a promise for the result.
|
Modifier and Type | Method and Description |
---|---|
static HealthCheck |
HealthCheck.of(String name,
Function<? super ExecControl,? extends Promise<HealthCheck.Result>> func)
Convenience factory for health check implementations.
|
Modifier and Type | Method and Description |
---|---|
default Promise<ReceivedResponse> |
HttpClient.get(URI uri) |
Promise<ReceivedResponse> |
HttpClient.get(URI uri,
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.
|
Promise<ReceivedResponse> |
HttpClient.post(URI uri,
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(URI uri,
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.
|
Promise<StreamedResponse> |
HttpClient.requestStream(URI uri,
Action<? super RequestSpec> requestConfigurer)
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,
the received response content will be streamed.
|
Modifier and Type | Method and Description |
---|---|
static <T> Promise<List<T>> |
RxRatpack.promise(Observable<T> observable)
Converts an
Observable into a Promise , for all of the observable's items. |
static <T> Promise<T> |
RxRatpack.promiseSingle(Observable<T> observable)
Converts an
Observable into a Promise , for the observable's single item. |
Modifier and Type | Method and Description |
---|---|
static <T> Observable<T> |
RxRatpack.observe(Promise<T> promise)
Converts a
Promise into an Observable . |
static <T,I extends Iterable<T>> |
RxRatpack.observeEach(Promise<I> promise)
Converts a
Promise for an iterable into an Observable . |
Modifier and Type | Method and Description |
---|---|
default Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(URI uri) |
Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(URI uri,
Action<? super RequestSpec> action) |
Modifier and Type | Method and Description |
---|---|
default Promise<List<T>> |
TransformablePublisher.toList()
Consumes the given publisher's items to a list.
|
default Promise<List<T>> |
TransformablePublisher.toList(ExecControl execControl)
|
static <T> Promise<List<T>> |
Streams.toList(ExecControl execControl,
org.reactivestreams.Publisher<T> publisher)
Creates a promise for the given publisher's items as a List.
|
static <T> Promise<List<T>> |
Streams.toList(org.reactivestreams.Publisher<T> publisher)
Delegates to
Streams.toList(ExecControl, Publisher) , using ExecControl.current() as the exec control. |
default Promise<T> |
TransformablePublisher.toPromise()
|
default Promise<T> |
TransformablePublisher.toPromise(ExecControl execControl)
|
static <T> Promise<T> |
Streams.toPromise(ExecControl execControl,
org.reactivestreams.Publisher<T> publisher)
Creates a promise for the given publisher's single item.
|
static <T> Promise<T> |
Streams.toPromise(org.reactivestreams.Publisher<T> publisher)
Calls
Streams.toPromise(ExecControl, Publisher) with ExecControl.current() and the given publisher. |
Modifier and Type | Method and Description |
---|---|
default <O> TransformablePublisher<O> |
TransformablePublisher.flatMap(Function<? super T,? extends Promise<? extends O>> function)
|
static <I,O> TransformablePublisher<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 <T> TransformablePublisher<T> |
Streams.flatYield(Function<? super YieldRequest,? extends Promise<? extends T>> producer)
Creates a new publisher, backed by the given asynchronous data producing function.
|
Modifier and Type | Method and Description |
---|---|
default <T> Promise<T> |
ExecHarness.blocking(Callable<T> blockingOperation)
Performs a blocking operation on a separate thread, returning a promise for its value.
|
default <T> Promise<T> |
ExecHarness.promise(Action<? super Fulfiller<T>> action)
Creates a promise for an asynchronously created value.
|
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. |