Invoked if the computation completes successfully.
Invoked if the computation completes successfully. Returns the new transformed value in a Future.
Invoked if the computation fails.
Invoked if the computation fails. Returns the new transformed value.
Invoked if the computation completes successfully.
Invoked if the computation completes successfully. Returns the new transformed value.
Note: this method will throw an AbstractMethodError
if it is not overridden.
Invoked if the computation completes unsuccessfully.
Invoked if the computation completes unsuccessfully. Returns the new Future value.
An alternative interface for performing Future transformations; that is, converting a Future[A] to a Future[B]. This interface is designed to be friendly to Java users since it does not require creating many small Function objects. It is used in conjunction with
transformedBy
.You must override one of
{map, flatMap}
. If you override bothmap
andflatMap
,flatMap
takes precedence. If you fail to override one of{map, flatMap}
, anAbstractMethodError
will be thrown at Runtime.Note: an exception e thrown in any of map/flatMap/handle/rescue will make the result of transformedBy be equivalent to Future.exception(e).
FutureEventListener for a Java API for side-effects.
Future.transformedBy for using it with a
Future
.Future.transform which is the equivalent Scala API for further details.