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> Single<R> |
collecting(java.util.stream.Collector<T,A,R> collector)
Deprecated.
|
String |
encoding() |
Completable |
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() |
GrpcReadStream<T> |
invalidMessageHandler(Handler<InvalidMessageException> handler)
Set a message handler that is reported with invalid message errors.
|
Single<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 .
|
Completable |
pipeTo(WriteStream<T> dst)
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)
Deprecated.
|
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, wait
newInstance, newInstance
newInstance
public 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 StreamBase
public 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 Completable 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 gzip
public 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)
ReadStream
exceptionHandler
in interface ReadStream<T>
exceptionHandler
in interface StreamBase
handler
- the exception handlerpublic GrpcReadStream<T> handler(Handler<T> handler)
ReadStream
handler
in interface ReadStream<T>
public GrpcReadStream<T> pause()
ReadStream
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
.
pause
in interface ReadStream<T>
public GrpcReadStream<T> resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<T>
public GrpcReadStream<T> fetch(long l)
ReadStream
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.fetch
in interface ReadStream<T>
public GrpcReadStream<T> endHandler(Handler<Void> handler)
ReadStream
endHandler
in interface ReadStream<T>
public Completable end()
public Completable rxEnd()
public GrpcReadStream<T> invalidMessageHandler(Handler<InvalidMessageException> handler)
Warning: setting this handler overwrite the default handler which takes appropriate measure when an invalid message is encountered such as cancelling the stream. This handler should be set when control over invalid messages is required.
handler
- the invalid message handler@Deprecated public <R,A> Single<R> collecting(java.util.stream.Collector<T,A,R> collector)
collector
- @Deprecated 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 © 2024 Eclipse. All rights reserved.