io.vertx.grpc

## Interface GrpcReadStream<T>

- All Superinterfaces:
    ReadStream<T>, StreamBase
  All Known Subinterfaces:
    GrpcBidiExchange<I,O>

      public interface GrpcReadStream<T>
      extends ReadStream<T>

  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    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)`

- - ### Method Detail

    - #### create

          static <T> GrpcReadStream<T> create(io.grpc.stub.StreamObserver<T> observer)

    - #### create

          static <T> GrpcReadStream<T> create()

    - #### exceptionHandler

          GrpcReadStream<T> exceptionHandler(Handler<Throwable> handler)

      Set an exception handler on the read stream.
      Specified by:
        `exceptionHandler` in interface `ReadStream<T>`
      Specified by:
        `exceptionHandler` in interface `StreamBase`
      Parameters:
        `handler` - the exception handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          GrpcReadStream<T> handler(Handler<T> handler)

      Set a data handler. As data is read, the handler will be called with the data.
      Specified by:
        `handler` in interface `ReadStream<T>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### pause

          GrpcReadStream<T> pause()

      Pause the `ReadSupport`. While it's paused, no data will be sent to the `dataHandler`
      Specified by:
        `pause` in interface `ReadStream<T>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### resume

          GrpcReadStream<T> resume()

      Resume reading. If the `ReadSupport` has been paused, reading will recommence on it.
      Specified by:
        `resume` in interface `ReadStream<T>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### fetch

          GrpcReadStream<T> fetch(long amount)

      Fetch the specified `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.
      Specified by:
        `fetch` in interface `ReadStream<T>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          GrpcReadStream<T> endHandler(Handler<Void> endHandler)

      Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
      Specified by:
        `endHandler` in interface `ReadStream<T>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### readObserver

          io.grpc.stub.StreamObserver<T> readObserver()

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

    - #### setReadObserver

          GrpcReadStream<T> setReadObserver(io.grpc.stub.StreamObserver<T> observer)

Copyright © 2019 Eclipse. All rights reserved.