public interface GrpcReadStream<T> extends ReadStream<T>
Modifier and Type | Method and Description |
---|---|
static <T> GrpcReadStream<T> |
create() |
static <T> GrpcReadStream<T> |
create(io.grpc.stub.StreamObserver<T> observer) |
GrpcReadStream<T> |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
GrpcReadStream<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
GrpcReadStream<T> |
fetch(long amount)
Fetch the specified
amount of elements. |
GrpcReadStream<T> |
handler(Handler<T> handler)
Set a data handler.
|
GrpcReadStream<T> |
pause()
Pause the
ReadSupport . |
io.grpc.stub.StreamObserver<T> |
readObserver()
Should not be used by end user, it is a simple accessor the the underlying gRPC StreamObserver.
|
GrpcReadStream<T> |
resume()
Resume reading.
|
GrpcReadStream<T> |
setReadObserver(io.grpc.stub.StreamObserver<T> observer) |
pipe, pipeTo, pipeTo
static <T> GrpcReadStream<T> create(io.grpc.stub.StreamObserver<T> observer)
static <T> GrpcReadStream<T> create()
GrpcReadStream<T> exceptionHandler(Handler<Throwable> handler)
exceptionHandler
in interface ReadStream<T>
exceptionHandler
in interface StreamBase
handler
- the exception handlerGrpcReadStream<T> handler(Handler<T> handler)
handler
in interface ReadStream<T>
GrpcReadStream<T> pause()
ReadSupport
. While it's paused, no data will be sent to the dataHandler
pause
in interface ReadStream<T>
GrpcReadStream<T> resume()
ReadSupport
has been paused, reading will recommence on it.resume
in interface ReadStream<T>
GrpcReadStream<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.fetch
in interface ReadStream<T>
GrpcReadStream<T> endHandler(Handler<Void> endHandler)
endHandler
in interface ReadStream<T>
io.grpc.stub.StreamObserver<T> readObserver()
GrpcReadStream<T> setReadObserver(io.grpc.stub.StreamObserver<T> observer)
Copyright © 2023 Eclipse. All rights reserved.