T- The value type of the resolved Promise passed as input to this callback.
R- The value type of the returned Promise from this callback.
@ConsumerType @FunctionalInterface public interface Success<T,R>
This method is called if the Promise with which it is registered resolves successfully.
In the remainder of this description we will refer to the Promise
returned by this method as the returned Promise and the Promise returned
Promise.then(Success) when this Success callback was
registered as the chained Promise.
If the returned Promise is
null then the chained Promise must
resolve immediately with a successful value of
null. If the
returned Promise is not
null then the chained Promise must be
resolved when the returned Promise is resolved.
resolved- The successfully resolved
nullif the chained Promise is to be resolved immediately with the value
java.lang.Exception- The chained Promise must be failed with the thrown exception.
Copyright © 2010 - 2020 Adobe. All Rights Reserved