Package | Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
TransformablePublisher<ByteBuf> |
StreamedResponse.getBody() |
Modifier and Type | Method and Description |
---|---|
static <T> TransformablePublisher<T> |
RxRatpack.publisher(Observable.OnSubscribe<T> onSubscribe)
Converts an
Observable into a Publisher , for all of the observable's items. |
static <T> TransformablePublisher<T> |
RxRatpack.publisher(Observable<T> observable)
Converts an
Observable into a Publisher , for all of the observable's items. |
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 |
---|---|
static <T> TransformablePublisher<T> |
Streams.bindExec(Publisher<T> publisher) |
default TransformablePublisher<T> |
TransformablePublisher.buffer()
|
static <T> TransformablePublisher<T> |
Streams.buffer(Publisher<T> publisher)
Returns a publisher that allows the given publisher to emit as fast as it can, while applying flow control downstream.
|
static <T> TransformablePublisher<T> |
Streams.constant(T item)
Creates a new publisher, that indefinitely streams the given object to all subscribers.
|
static <T> TransformablePublisher<T> |
Streams.fanOut(Publisher<? extends Iterable<T>> publisher)
Returns a publisher that publishes each element from Collections that are produced from the given input publisher.
|
default TransformablePublisher<T> |
TransformablePublisher.filter(Predicate<T> filter)
|
static <T> TransformablePublisher<T> |
Streams.filter(Publisher<T> input,
Predicate<T> filter)
Returns a publisher that filters items from the given input stream by applying the given filter predicate.
|
default <O> TransformablePublisher<O> |
TransformablePublisher.flatMap(Function<? super T,? extends Promise<? extends O>> function)
|
static <I,O> TransformablePublisher<O> |
Streams.flatMap(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.
|
default TransformablePublisher<T> |
TransformablePublisher.gate(Action<? super Runnable> valveReceiver)
|
static <T> TransformablePublisher<T> |
Streams.gate(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.
|
default <O> TransformablePublisher<O> |
TransformablePublisher.map(Function<? super T,? extends O> function)
|
static <I,O> TransformablePublisher<O> |
Streams.map(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> TransformablePublisher<T> |
Streams.merge(Publisher<? extends T>... publishers)
Returns a publisher that merges the given input publishers into a single stream of elements.
|
default TransformablePublisher<T> |
TransformablePublisher.multicast()
|
static <T> TransformablePublisher<T> |
Streams.multicast(Publisher<T> publisher)
Returns a publisher that will stream events emitted from the given publisher to all of its subscribers.
|
static <T> TransformablePublisher<T> |
Streams.periodically(Registry registry,
Duration duration,
Function<Integer,T> producer) |
static <T> TransformablePublisher<T> |
Streams.periodically(ScheduledExecutorService executorService,
Duration duration,
Function<Integer,T> producer)
Executes the given function periodically, publishing the return value to the subscriber.
|
static <T> TransformablePublisher<T> |
Streams.publish(Iterable<T> iterable)
Converts an iterable to a publishable.
|
default <O> TransformablePublisher<O> |
TransformablePublisher.streamMap(Function<? super WriteStream<O>,? extends WriteStream<T>> function)
|
static <I,O> TransformablePublisher<O> |
Streams.streamMap(Publisher<I> input,
Function<? super WriteStream<O>,? extends WriteStream<I>> mapper)
Allows transforming a stream into an entirely different stream.
|
default <O> TransformablePublisher<O> |
TransformablePublisher.transform(Function<? super TransformablePublisher<T>,? extends Publisher<O>> transformer)
Convenience method to allow a non Ratpack publisher transform method to be hooked in.
|
static <T> TransformablePublisher<T> |
Streams.transformable(Publisher<T> publisher)
Wraps the publisher in Ratpack's
TransformablePublisher to make composing a pipeline easier. |
default TransformablePublisher<T> |
TransformablePublisher.wiretap(Action<? super StreamEvent<? super T>> listener)
|
static <T> TransformablePublisher<T> |
Streams.wiretap(Publisher<T> publisher,
Action<? super StreamEvent<? super T>> listener)
Allows listening to the events of the given publisher as they flow to subscribers.
|
static <T> TransformablePublisher<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 |
---|---|
default <O> TransformablePublisher<O> |
TransformablePublisher.transform(Function<? super TransformablePublisher<T>,? extends Publisher<O>> transformer)
Convenience method to allow a non Ratpack publisher transform method to be hooked in.
|