interface GrpcWriteStream<T : Any> : WriteStream<T>
Author
Paulo Lopes
open static fun <T : Any> create(observer: StreamObserver<T>): GrpcWriteStream<T> |
|
abstract fun drainHandler(handler: Handler<Void>): GrpcWriteStream<T>
Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue is ready to accept buffers again. See Pump for an example of this being used. The stream implementation defines when the drain handler, for example it could be when the queue size has been reduced to |
|
abstract fun exceptionHandler(handler: Handler<Throwable>): GrpcWriteStream<T>
Set an exception handler on the write stream. |
|
abstract fun fail(t: Throwable): GrpcWriteStream<T>
Send an error event into the stream. |
|
abstract fun setWriteQueueMaxSize(maxSize: Int): GrpcWriteStream<T>
Set the maximum size of the write queue to |
|
abstract fun write(data: T): GrpcWriteStream<T>
Write some data to the stream. The data is put on an internal write queue, and the write actually happens asynchronously. To avoid running out of memory by putting too much on the write queue, check the |
|
abstract fun writeObserver(): StreamObserver<T>
Should not be used by end user, it is a simple accessor the the underlying gRPC StreamObserver. |
interface GrpcBidiExchange<I : Any, O : Any> : GrpcReadStream<I>, GrpcWriteStream<O> |
|
interface GrpcUniExchange<O : Any, I : Any> : GrpcWriteStream<O> |