vertx / io.vertx.grpc / GrpcReadStream

GrpcReadStream

interface GrpcReadStream<T : Any> : ReadStream<T>

Author
Paulo Lopes

Functions

create

open static fun <T : Any> create(observer: StreamObserver<T>): GrpcReadStream<T>
open static fun <T : Any> create(): GrpcReadStream<T>

endHandler

abstract fun endHandler(endHandler: Handler<Void>): GrpcReadStream<T>

Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.

exceptionHandler

abstract fun exceptionHandler(handler: Handler<Throwable>): GrpcReadStream<T>

Set an exception handler on the read stream.

handler

abstract fun handler(handler: Handler<T>): GrpcReadStream<T>

Set a data handler. As data is read, the handler will be called with the data.

pause

abstract fun pause(): GrpcReadStream<T>

Pause the ReadSupport. While it's paused, no data will be sent to the dataHandler

readObserver

abstract fun readObserver(): StreamObserver<T>

Should not be used by end user, it is a simple accessor the the underlying gRPC StreamObserver.

resume

abstract fun resume(): GrpcReadStream<T>

Resume reading. If the ReadSupport has been paused, reading will recommence on it.

setReadObserver

abstract fun setReadObserver(observer: StreamObserver<T>): GrpcReadStream<T>

Inheritors

GrpcBidiExchange

interface GrpcBidiExchange<I : Any, O : Any> : GrpcReadStream<I>, GrpcWriteStream<O>