Class StateCheckingResponseObserver<V>

    • Constructor Detail

      • StateCheckingResponseObserver

        public StateCheckingResponseObserver()
    • Method Detail

      • onComplete

        public final void onComplete()
        Receives a notification of successful stream completion.

        May only be called once, and if called, it must be the last method called. In particular, if an exception is thrown by an implementation of onComplete, no further calls to any method are allowed.

        This implementation simply delegates to onCompleteImpl() after ensuring consistent state.

        Specified by:
        onComplete in interface ResponseObserver<V>
      • onError

        public final void onError​(java.lang.Throwable t)
        Receives a terminating error from the stream.

        May only be called once, and if called, it must be the last method called. In particular, if an exception is thrown by an implementation of onError, no further calls to any method are allowed.

        This implementation simply delegates to onErrorImpl(Throwable) after ensuring consistent state.

        Specified by:
        onError in interface ResponseObserver<V>
        Parameters:
        t - the error occurred on the stream
      • onResponseImpl

        protected abstract void onResponseImpl​(V response)
        See Also:
        onResponse(Object)
      • onErrorImpl

        protected abstract void onErrorImpl​(java.lang.Throwable t)
        See Also:
        onErrorImpl(Throwable)
      • onCompleteImpl

        protected abstract void onCompleteImpl()
        See Also:
        onComplete()