Class SafeResponseObserver<ResponseT>

java.lang.Object
com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver<ResponseT>
All Implemented Interfaces:
com.google.api.gax.rpc.ResponseObserver<ResponseT>

@InternalApi public abstract class SafeResponseObserver<ResponseT> extends Object implements com.google.api.gax.rpc.ResponseObserver<ResponseT>
Base implementation of ResponseObserver that checks the state and catches all the throwables.
  • Constructor Details

    • SafeResponseObserver

      public SafeResponseObserver(com.google.api.gax.rpc.ResponseObserver outerObserver)
  • Method Details

    • onStart

      public final void onStart(com.google.api.gax.rpc.StreamController streamController)
      Specified by:
      onStart in interface com.google.api.gax.rpc.ResponseObserver<ResponseT>
    • onResponse

      public final void onResponse(ResponseT response)
      Specified by:
      onResponse in interface com.google.api.gax.rpc.ResponseObserver<ResponseT>
    • onError

      public final void onError(Throwable throwable)
      Specified by:
      onError in interface com.google.api.gax.rpc.ResponseObserver<ResponseT>
    • onComplete

      public final void onComplete()
      Specified by:
      onComplete in interface com.google.api.gax.rpc.ResponseObserver<ResponseT>
    • onStartImpl

      protected abstract void onStartImpl(com.google.api.gax.rpc.StreamController streamController)
    • onResponseImpl

      protected abstract void onResponseImpl(ResponseT response)
    • onErrorImpl

      protected abstract void onErrorImpl(Throwable throwable)
    • onCompleteImpl

      protected abstract void onCompleteImpl()