fun <U> then(fn: (value: T) -> FxaResult<U>?): FxaResult<U>
(source)
Adds a value listener to be called when the FxaResult is completed with a value. Listeners will be invoked on the same thread in which the FxaResult was completed.
fn
- A lambda expression with the same method signature as OnValueListener,
called when the FxaResult is completed with a value.
fun <U> then(vfn: (value: T) -> FxaResult<U>?, efn: (Exception) -> FxaResult<U>?): FxaResult<U>
(source)
Adds listeners to be called when the FxaResult is completed either with a value or Exception. Listeners will be invoked on the same thread in which the FxaResult was completed.
vfn
- A lambda expression with the same method signature as OnValueListener,
called when the FxaResult is completed with a value.
efn
- A lambda expression with the same method signature as OnExceptionListener,
called when the FxaResult is completed with an exception.
@Synchronized fun <U> then(valueListener: OnValueListener<T, U>, exceptionListener: OnExceptionListener<U>?): FxaResult<U>
(source)
Adds listeners to be called when the FxaResult is completed either with a value or Exception. Listeners will be invoked on the same thread in which the FxaResult was completed.
valueListener
- An instance of OnValueListener, called when the
FxaResult is completed with a value.
exceptionListener
- An instance of OnExceptionListener, called when the
FxaResult is completed with an Exception.