public class GrpcReadStream<T> extends Object implements ReadStream<T>
| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<GrpcReadStream> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<T> |
__typeArg_0 |
| Constructor and Description |
|---|
GrpcReadStream(GrpcReadStream delegate) |
GrpcReadStream(Object delegate,
io.vertx.lang.rx.TypeArg<T> typeArg_0) |
| Modifier and Type | Method and Description |
|---|---|
<R,A> Future<R> |
collecting(java.util.stream.Collector<T,A,R> collector) |
String |
encoding() |
Future<Void> |
end() |
GrpcReadStream<T> |
endHandler(Handler<Void> handler)
Set an end handler.
|
boolean |
equals(Object o) |
GrpcReadStream<T> |
errorHandler(Handler<GrpcError> handler)
Set a handler to be notified with gRPC errors.
|
GrpcReadStream<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
GrpcReadStream<T> |
fetch(long l)
Fetch the specified
amount of elements. |
GrpcReadStream |
getDelegate() |
GrpcReadStream<T> |
handler(Handler<T> handler)
Set a data handler.
|
int |
hashCode() |
MultiMap |
headers() |
Future<T> |
last() |
GrpcReadStream<T> |
messageHandler(Handler<GrpcMessage> handler)
Set a handler to be notified with incoming encoded messages.
|
static <T> GrpcReadStream<T> |
newInstance(GrpcReadStream arg) |
static <T> GrpcReadStream<T> |
newInstance(GrpcReadStream arg,
io.vertx.lang.rx.TypeArg<T> __typeArg_T) |
GrpcReadStream<T> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
Pipe<T> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
void |
pipeTo(WriteStream<T> dst)
Pipe this
ReadStream to the WriteStream. |
void |
pipeTo(WriteStream<T> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream. |
GrpcReadStream<T> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
<R,A> Single<R> |
rxCollecting(java.util.stream.Collector<T,A,R> collector) |
Completable |
rxEnd() |
Single<T> |
rxLast() |
Completable |
rxPipeTo(WriteStream<T> dst)
Pipe this
ReadStream to the WriteStream. |
Flowable<T> |
toFlowable() |
Observable<T> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstance, newInstancenewInstancepublic static final io.vertx.lang.rx.TypeArg<GrpcReadStream> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
public GrpcReadStream(GrpcReadStream delegate)
public GrpcReadStream getDelegate()
getDelegate in interface ReadStream<T>getDelegate in interface StreamBasepublic Observable<T> toObservable()
toObservable in interface ReadStream<T>public Flowable<T> toFlowable()
toFlowable in interface ReadStream<T>public Pipe<T> pipe()
WriteStream.pipe in interface ReadStream<T>public void pipeTo(WriteStream<T> dst, Handler<AsyncResult<Void>> handler)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
pipeTo in interface ReadStream<T>dst - the destination write streamhandler - public void pipeTo(WriteStream<T> dst)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
pipeTo in interface ReadStream<T>dst - the destination write streampublic Completable rxPipeTo(WriteStream<T> dst)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
rxPipeTo in interface ReadStream<T>dst - the destination write streampublic MultiMap headers()
public String encoding()
identity or gzippublic GrpcReadStream<T> messageHandler(Handler<GrpcMessage> handler)
handler is
responsible for fully decoding incoming messages, including compression.handler - the message handlerpublic GrpcReadStream<T> errorHandler(Handler<GrpcError> handler)
handler - the error handlerpublic GrpcReadStream<T> exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<T>exceptionHandler in interface StreamBasehandler - the exception handlerpublic GrpcReadStream<T> handler(Handler<T> handler)
ReadStreamhandler in interface ReadStream<T>public GrpcReadStream<T> pause()
ReadStreamReadStream, 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.
pause in interface ReadStream<T>public GrpcReadStream<T> resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<T>public GrpcReadStream<T> fetch(long l)
ReadStreamamount 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.fetch in interface ReadStream<T>public GrpcReadStream<T> endHandler(Handler<Void> handler)
ReadStreamendHandler in interface ReadStream<T>public Future<Void> end()
public Completable rxEnd()
public <R,A> Future<R> collecting(java.util.stream.Collector<T,A,R> collector)
collector - public <R,A> Single<R> rxCollecting(java.util.stream.Collector<T,A,R> collector)
collector - public static <T> GrpcReadStream<T> newInstance(GrpcReadStream arg)
public static <T> GrpcReadStream<T> newInstance(GrpcReadStream arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
Copyright © 2023 Eclipse. All rights reserved.