Package | Description |
---|---|
ratpack.exec.util | |
ratpack.file |
Types for dealing with the file system and serving files.
|
ratpack.http |
The HTTP protocol.
|
ratpack.http.client |
The HTTP client.
|
ratpack.reactor |
Provides integration with the Project Reactor library.
|
ratpack.rx |
Provides integration with the RxJava library.
|
ratpack.rx2 |
Provides integration with the RxJava library.
|
ratpack.sse |
Support for Server Sent Events.
|
ratpack.stream |
Support for reactive streams.
|
ratpack.stream.bytebuf |
Modifier and Type | Method and Description |
---|---|
TransformablePublisher<T> |
ParallelBatch.publisher()
Creates a publisher that emits the promised values.
|
TransformablePublisher<T> |
Batch.publisher()
Creates a publisher that emits the promised values.
|
TransformablePublisher<T> |
SerialBatch.publisher()
Creates a publisher that emits the promised values.
|
Modifier and Type | Method and Description |
---|---|
static TransformablePublisher<io.netty.buffer.ByteBuf> |
FileIo.readStream(Promise<? extends java.nio.channels.AsynchronousFileChannel> file,
io.netty.buffer.ByteBufAllocator allocator,
int bufferSize)
Streams the entire contents of a file.
|
static TransformablePublisher<io.netty.buffer.ByteBuf> |
FileIo.readStream(Promise<? extends java.nio.channels.AsynchronousFileChannel> file,
io.netty.buffer.ByteBufAllocator allocator,
int bufferSize,
long start,
long stop)
Streams the contents of a file.
|
Modifier and Type | Method and Description |
---|---|
TransformablePublisher<? extends io.netty.buffer.ByteBuf> |
Request.getBodyStream()
Allows reading the body as a stream, with back pressure.
|
TransformablePublisher<? extends io.netty.buffer.ByteBuf> |
Request.getBodyStream(long maxContentLength)
Allows reading the body as a stream, with back pressure.
|
Modifier and Type | Method and Description |
---|---|
TransformablePublisher<io.netty.buffer.ByteBuf> |
StreamedResponse.getBody() |
Modifier and Type | Method and Description |
---|---|
static <T> TransformablePublisher<T> |
ReactorRatpack.publisher(Flux<T> flux)
|
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 |
---|---|
static <T> TransformablePublisher<T> |
RxRatpack.publisher(Observable<T> observable,
BackpressureStrategy strategy)
Converts an
Observable into a Publisher , for all of the observable's items. |
static <T> TransformablePublisher<T> |
RxRatpack.publisher(ObservableOnSubscribe<T> onSubscribe,
BackpressureStrategy strategy)
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(java.net.URI uri) |
Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(java.net.URI uri,
Action<? super RequestSpec> action) |
Modifier and Type | Method and Description |
---|---|
default TransformablePublisher<T> |
TransformablePublisher.batch(int batchSize,
Action<? super T> disposer)
|
static <T> TransformablePublisher<T> |
Streams.batch(int batchSize,
Publisher<T> publisher,
Action<? super T> disposer)
Batches and serialised demand.
|
default TransformablePublisher<T> |
TransformablePublisher.bindExec()
|
default TransformablePublisher<T> |
TransformablePublisher.bindExec(Action<? super T> disposer)
|
static <T> TransformablePublisher<T> |
Streams.bindExec(Publisher<T> publisher)
Binds the given publisher to the current
Execution . |
static <T> TransformablePublisher<T> |
Streams.bindExec(Publisher<T> publisher,
Action<? super T> disposer)
Binds the given publisher to the current
Execution . |
default TransformablePublisher<T> |
TransformablePublisher.buffer()
|
static <T> TransformablePublisher<T> |
Streams.buffer(Publisher<T> publisher)
Returns a publisher that allows the given publisher to without respecting demand.
|
static <T> TransformablePublisher<T> |
Streams.concat(java.lang.Iterable<? extends Publisher<? extends T>> publishers)
Similar to
Streams.concat(Iterable, Action) , but with a noop disposer. |
static <T> TransformablePublisher<T> |
Streams.concat(java.lang.Iterable<? extends Publisher<? extends T>> publishers,
Action<? super T> disposer)
Returns a publisher that aggregates the given publishers into a single stream of elements, without interleaving them.
|
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.empty()
An empty publisher that immediately completes.
|
static <T> TransformablePublisher<T> |
Streams.fanOut(Publisher<? extends java.lang.Iterable<? extends T>> publisher)
Returns a publisher that publishes each element from Collections that are produced from the given input publisher.
|
static <T> TransformablePublisher<T> |
Streams.fanOut(Publisher<? extends java.lang.Iterable<? extends T>> publisher,
Action<? super T> disposer)
Returns a publisher that publishes each element from Collections that are produced from the given input publisher.
|
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.
|
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.flatten(Publisher<? extends Publisher<T>> publisher)
Creates a single publisher from a publisher of publishers.
|
static <T> TransformablePublisher<T> |
Streams.flatten(Publisher<? extends Publisher<T>> publisher,
Action<? super T> disposer)
Creates a single publisher from a publisher of publishers.
|
static <T> TransformablePublisher<T> |
Streams.flatYield(Function<? super YieldRequest,? extends Promise<T>> producer)
Creates a new publisher, backed by the given asynchronous data producing function.
|
default TransformablePublisher<T> |
TransformablePublisher.fork()
Consumes the given publisher eagerly in a forked execution, buffering results until ready to be consumed by this execution.
|
default TransformablePublisher<T> |
TransformablePublisher.fork(Action<? super ExecSpec> execConfig,
Action<? super T> disposer)
Consumes the given publisher eagerly in a forked execution, buffering results until ready to be consumed by this execution.
|
static <T> TransformablePublisher<T> |
Streams.fork(Publisher<T> publisher,
Action<? super ExecSpec> execConfig,
Action<? super T> disposer)
Consumes the given publisher eagerly in a forked execution, buffering results until ready to be consumed by this execution.
|
default TransformablePublisher<T> |
TransformablePublisher.gate(Action<? super java.lang.Runnable> valveReceiver)
|
static <T> TransformablePublisher<T> |
Streams.gate(Publisher<T> publisher,
Action<? super java.lang.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,
java.time.Duration duration,
Function<? super java.lang.Integer,? extends T> producer) |
static <T> TransformablePublisher<T> |
Streams.periodically(java.util.concurrent.ScheduledExecutorService executorService,
java.time.Duration duration,
Function<? super java.lang.Integer,? extends T> producer)
Executes the given function periodically, publishing the return value to the subscriber.
|
static <T> TransformablePublisher<T> |
Streams.publish(java.lang.Iterable<T> iterable)
Converts an iterable to a publishable.
|
static <T> TransformablePublisher<T> |
Streams.publish(Promise<? extends java.lang.Iterable<T>> promise)
Converts a
Promise for an iterable into a publishable. |
default <O> TransformablePublisher<O> |
TransformablePublisher.streamMap(Function<? super WriteStream<O>,? extends WriteStream<? super T>> function)
Deprecated.
since 1.4, use
streamMap(StreamMapper) |
static <U,D> TransformablePublisher<D> |
Streams.streamMap(Publisher<? extends U> input,
StreamMapper<? super U,D> mapper)
Allows transforming a stream into an entirely different stream.
|
static <U,D> TransformablePublisher<D> |
Streams.streamMap(Publisher<U> input,
Function<? super WriteStream<D>,? extends WriteStream<? super U>> mapper)
Deprecated.
since 1.4, use
Streams.streamMap(Publisher, StreamMapper) |
default <O> TransformablePublisher<O> |
TransformablePublisher.streamMap(StreamMapper<? super T,O> mapper)
|
default TransformablePublisher<T> |
TransformablePublisher.take(long count)
|
static <T> TransformablePublisher<T> |
Streams.take(long count,
Publisher<T> upstreamPublisher)
Returns a publisher that emits only the first
n elements from the given publisher, where n is the
given count. |
default <O> TransformablePublisher<O> |
TransformablePublisher.transform(java.util.function.Function<? super TransformablePublisher<? extends 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<T>> listener)
|
static <T> TransformablePublisher<T> |
Streams.wiretap(Publisher<T> publisher,
Action<? super StreamEvent<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,? extends 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(java.util.function.Function<? super TransformablePublisher<? extends T>,? extends Publisher<O>> transformer)
Convenience method to allow a non Ratpack publisher transform method to be hooked in.
|
Modifier and Type | Method and Description |
---|---|
static TransformablePublisher<io.netty.buffer.CompositeByteBuf> |
ByteBufStreams.buffer(Publisher<? extends io.netty.buffer.ByteBuf> publisher,
long sizeWatermark,
int maxNum)
Buffers and composes byte bufs together into composites before emitting.
|
static TransformablePublisher<io.netty.buffer.CompositeByteBuf> |
ByteBufStreams.buffer(Publisher<? extends io.netty.buffer.ByteBuf> publisher,
long sizeWatermark,
int maxNum,
io.netty.buffer.ByteBufAllocator alloc)
Buffers and composes byte bufs together into composites before emitting.
|