public interface GrpcReadStream<T> extends ReadStream<T>
| Modifier and Type | Method and Description |
|---|---|
default <R,A> Future<R> |
collecting(java.util.stream.Collector<T,A,R> collector)
Deprecated.
instead use
ReadStream.collect(Collector) |
String |
encoding() |
Future<Void> |
end() |
GrpcReadStream<T> |
endHandler(Handler<Void> handler)
Set an end handler.
|
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<T> |
handler(Handler<T> handler)
Set a data handler.
|
MultiMap |
headers() |
GrpcReadStream<T> |
invalidMessageHandler(Handler<InvalidMessageException> handler)
Set a message handler that is reported with invalid message errors.
|
Future<T> |
last() |
GrpcReadStream<T> |
messageHandler(Handler<GrpcMessage> handler)
Set a handler to be notified with incoming encoded messages.
|
GrpcReadStream<T> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
GrpcReadStream<T> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
collect, pipe, pipeTo, pipeToString encoding()
identity or gzipGrpcReadStream<T> messageHandler(Handler<GrpcMessage> handler)
handler is
responsible for fully decoding incoming messages, including compression.handler - the message handlerGrpcReadStream<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 handlerGrpcReadStream<T> errorHandler(Handler<GrpcError> handler)
handler - the error handlerGrpcReadStream<T> exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<T>exceptionHandler in interface StreamBasehandler - the exception handlerGrpcReadStream<T> handler(Handler<T> handler)
ReadStreamhandler in interface ReadStream<T>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>GrpcReadStream<T> resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<T>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>GrpcReadStream<T> endHandler(Handler<Void> handler)
ReadStreamendHandler in interface ReadStream<T>Future<Void> end()
@Deprecated default <R,A> Future<R> collecting(java.util.stream.Collector<T,A,R> collector)
ReadStream.collect(Collector)Copyright © 2025 Eclipse. All rights reserved.