Class SafeResponseObserver<ResponseT> (2.16.0)

public abstract class SafeResponseObserver<ResponseT> implements ResponseObserver<ResponseT>

Base implementation of ResponseObserver that checks the state and catches all the throwables.

Inheritance

java.lang.Object > SafeResponseObserver<ResponseT>

Implements

com.google.api.gax.rpc.ResponseObserver<ResponseT>

Type Parameter

NameDescription
ResponseT

Constructors

SafeResponseObserver(ResponseObserver outerObserver)

public SafeResponseObserver(ResponseObserver outerObserver)
Parameter
NameDescription
outerObserverResponseObserver

Methods

onComplete()

public final void onComplete()

onCompleteImpl()

protected abstract void onCompleteImpl()

onError(Throwable throwable)

public final void onError(Throwable throwable)
Parameter
NameDescription
throwableThrowable

onErrorImpl(Throwable throwable)

protected abstract void onErrorImpl(Throwable throwable)
Parameter
NameDescription
throwableThrowable

onResponse(ResponseT response)

public final void onResponse(ResponseT response)
Parameter
NameDescription
responseResponseT

onResponseImpl(ResponseT response)

protected abstract void onResponseImpl(ResponseT response)
Parameter
NameDescription
responseResponseT

onStart(StreamController streamController)

public final void onStart(StreamController streamController)
Parameter
NameDescription
streamControllerStreamController

onStartImpl(StreamController streamController)

protected abstract void onStartImpl(StreamController streamController)
Parameter
NameDescription
streamControllerStreamController