- java.lang.Object
-
- mutiny.zero.operators.Recover<T>
-
- Type Parameters:
T
- the elements type
- All Implemented Interfaces:
java.util.concurrent.Flow.Publisher<T>
public class Recover<T> extends java.lang.Object implements java.util.concurrent.Flow.Publisher<T>
AFlow.Publisher
that recovers from failure using aFunction
.The provided function accepts an error that would normally trigger an
Flow.Subscriber.onError(Throwable)
signal.The function returns a recovery value of type
T
, then the stream terminates with anFlow.Subscriber.onComplete()
signal. If the function returnsnull
then the stream terminates directly with a completion event.The stream ends with an error if the function throws an exception.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
subscribe(java.util.concurrent.Flow.Subscriber<? super T> subscriber)
-