Package org.forgerock.openig.util
Class PromiseUtil
java.lang.Object
org.forgerock.openig.util.PromiseUtil
Utility class for promises management.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ResultHandler<T>
consumeIfPresent
(Consumer<T> consumer) Execute the consumer if result is not null.
-
Method Details
-
consumeIfPresent
Execute the consumer if result is not null.- Type Parameters:
T
- The object type to handle- Parameters:
consumer
- a consumer for the expected result.- Returns:
- a
ResultHandler
that consumes the promised result.
-