public interface ReadStream<T> extends StreamBase
Any class that implements this interface can be used by a Pump to pump data from it
to a WriteStream.
handler.handler.pause(), resume() and fetch(long) methods:
resume() sets the flowing modepause() sets the fetch mode and resets the demand to 0fetch(long) requests a specific amount of elements and adds it to the actual demandoriginal non RX-ified interface using Vert.x codegen.| Modifier and Type | Method and Description |
|---|---|
ReadStream<T> |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
ReadStream<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
ReadStream<T> |
fetch(long amount)
Fetch the specified
amount of elements. |
ReadStream |
getDelegate() |
ReadStream<T> |
handler(Handler<T> handler)
Set a data handler.
|
static <T> ReadStream<T> |
newInstance(ReadStream arg) |
static <T> ReadStream<T> |
newInstance(ReadStream arg,
io.vertx.lang.rx.TypeArg<T> __typeArg_T) |
ReadStream<T> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
ReadStream<T> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Flowable<T> |
toFlowable() |
Observable<T> |
toObservable() |
newInstanceReadStream getDelegate()
getDelegate in interface StreamBaseReadStream<T> exceptionHandler(Handler<Throwable> handler)
exceptionHandler in interface StreamBasehandler - the exception handlerReadStream<T> handler(Handler<T> handler)
handler - ReadStream<T> pause()
ReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
ReadStream<T> resume()
flowing mode.
If the ReadStream has been paused, reading will recommence on it.ReadStream<T> fetch(long amount)
amount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.amount - ReadStream<T> endHandler(Handler<Void> endHandler)
endHandler - Observable<T> toObservable()
static <T> ReadStream<T> newInstance(ReadStream arg)
static <T> ReadStream<T> newInstance(ReadStream arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
Copyright © 2018 Eclipse. All rights reserved.