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(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>` | `handler(Handler<T> handler)` Set a data handler.
    `GrpcReadStream<T>` | `pause()` Pause the `ReadSupport`.
    `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(StreamObserver<T> observer)`

- - ### Method Detail

    - #### create

          static <T> GrpcReadStream<T> create(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

    - #### 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

          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(StreamObserver<T> observer)

Copyright © 2017. All rights reserved.