Operators#onNextError(Object, Throwable, Context, Subscription)
and Operators#onNextPollError(Object, Throwable, Context) methods.
See stop(), resumeDrop(), resumeDropIf(Predicate),
resume(BiConsumer) and resumeIf(Predicate, BiConsumer)
for the possible strategies.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | KEY_ON_NEXT_ERROR_STRATEGY
The key that can be used to store an |
| public static final OnNextFailureStrategy | |
| public static final OnNextFailureStrategy |
| Modifier and Type | Method and Description |
|---|---|
| public default Throwable | apply(Throwable
the first function argument throwable, Object the second function argument o)Implements java. |
| public Throwable | Returns: null if the error was processed for resume, aThrowable to propagate
otherwise.the error being recovered from. error, Object the value causing the error, null if not applicable. value, Context the context)Context associated with the recovering sequence.Process an error and the optional value that caused it (when applicable) in preparation for sequence resume, so that the error is not completely swallowed. |
| public static OnNextFailureStrategy | Returns: a newOnNextFailureStrategy that allows resuming the sequence.the errorConsumer)Object> to process the recovered errors with.
It must deal with potential nulls.A strategy that let all errors resume. |
| public static OnNextFailureStrategy | |
| public static OnNextFailureStrategy | resumeDropIf(Predicate<Throwable>
the predicate to match in order to resume from an error. causePredicate)A strategy that let some error resume. |
| public static OnNextFailureStrategy | Returns: a newOnNextFailureStrategy that allows resuming the sequence.the causePredicate, BiConsumer<Throwable, Object> Predicate to use to determine if a failure
should be recovered from.the errorConsumer)Object> to process the recovered errors with.
It must deal with potential nulls.A strategy that let some errors resume. |
| public static OnNextFailureStrategy | |
| public boolean | test(Throwable
the first input argument throwable, Object the second input argument o)Redeclares java. |
| KEY_ON_NEXT_ERROR_STRATEGY | back to summary |
|---|---|
| public static final String KEY_ON_NEXT_ERROR_STRATEGY The key that can be used to store an | |
| RESUME_DROP | back to summary |
|---|---|
| public static final OnNextFailureStrategy RESUME_DROP | |
| STOP | back to summary |
|---|---|
| public static final OnNextFailureStrategy STOP | |
| apply | back to summary |
|---|---|
| public default Throwable apply(Throwable throwable, Object o) Implements java. Doc from java. Applies this function to the given arguments. | |
| process | back to summary |
|---|---|
| public Throwable process(Throwable error, Object value, Context context) Process an error and the optional value that caused it (when applicable) in preparation for sequence resume, so that the error is not completely swallowed.
If the strategy cannot resume this kind of error (ie.
| |
| resume | back to summary |
|---|---|
| public static OnNextFailureStrategy resume(BiConsumer<Throwable, Object> errorConsumer) A strategy that let all errors resume. When processing, the error and the
incriminating source value are passed to custom
Any exception thrown by the consumers will suppress the original error and be
returned for propagation. If the original error is fatal then it is thrown
upon processing it (see
| |
| resumeDrop | back to summary |
|---|---|
| public static OnNextFailureStrategy resumeDrop() A strategy that let all error resume. When processing, the error is passed to the
| |
| resumeDropIf | back to summary |
|---|---|
| public static OnNextFailureStrategy resumeDropIf(Predicate<Throwable> causePredicate) A strategy that let some error resume. When processing, the error is passed to the
Any exception thrown by the predicate is thrown as is. | |
| resumeIf | back to summary |
|---|---|
| public static OnNextFailureStrategy resumeIf(Predicate<Throwable> causePredicate, BiConsumer<Throwable, Object> errorConsumer) A strategy that let some errors resume. When processing, the error and the
incriminating source value are passed to custom
Any exception thrown by the predicate is thrown as is. Any exception thrown by
the consumers will suppress the original error and be returned for propagation.
Even if the original error is fatal, if it passes the predicate then it can
be processed and recovered from (see
| |
| stop | back to summary |
|---|---|
| public static OnNextFailureStrategy stop() A strategy that never let any error resume. | |
| test | back to summary |
|---|---|
| public boolean test(Throwable throwable, Object o) Redeclares java. Doc from java. Evaluates this predicate on the given arguments. | |
| Modifier and Type | Field and Description |
|---|---|
| private final BiPredicate | |
| private final BiFunction |
| Access | Constructor and Description |
|---|---|
| public | LambdaOnNextErrorStrategy(BiFunction<? super Throwable, Object, ? extends Throwable> delegateProcessor)
|
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | process(Throwable
the error being recovered from. error, Object the value causing the error, null if not applicable. value, Context the ignored)Context associated with the recovering sequence.Implements reactor. |
| public boolean | test(Throwable
the first input argument error, Object the second input argument value)Implements reactor. |
| delegatePredicate | back to summary |
|---|---|
| private final BiPredicate<? super Throwable, Object> delegatePredicate | |
| delegateProcessor | back to summary |
|---|---|
| private final BiFunction<? super Throwable, Object, ? extends Throwable> delegateProcessor | |
| LambdaOnNextErrorStrategy | back to summary |
|---|---|
public LambdaOnNextErrorStrategy(BiFunction<? super Throwable, Object, ? extends Throwable> delegateProcessor)
| |
| process | back to summary |
|---|---|
| public Throwable process(Throwable error, Object value, Context ignored) Implements reactor. Doc from reactor. Process an error and the optional value that caused it (when applicable) in preparation for sequence resume, so that the error is not completely swallowed.
If the strategy cannot resume this kind of error (ie. | |
| test | back to summary |
|---|---|
| public boolean test(Throwable error, Object value) Implements reactor. Doc from java. Evaluates this predicate on the given arguments. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | process(Throwable
the error being recovered from. error, Object the value causing the error, null if not applicable. value, Context the context)Context associated with the recovering sequence.Implements reactor. |
| public boolean | test(Throwable
the first input argument error, Object the second input argument value)Implements reactor. |
| errorPredicate | back to summary |
|---|---|
| pack-priv final Predicate<Throwable> errorPredicate | |
| ResumeDropStrategy | back to summary |
|---|---|
| pack-priv ResumeDropStrategy(Predicate<Throwable> errorPredicate) | |
| process | back to summary |
|---|---|
| public Throwable process(Throwable error, Object value, Context context) Implements reactor. Doc from reactor. Process an error and the optional value that caused it (when applicable) in preparation for sequence resume, so that the error is not completely swallowed.
If the strategy cannot resume this kind of error (ie. | |
| test | back to summary |
|---|---|
| public boolean test(Throwable error, Object value) Implements reactor. Doc from java. Evaluates this predicate on the given arguments. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final BiConsumer | |
| pack-priv final Predicate |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | process(Throwable
the error being recovered from. error, Object the value causing the error, null if not applicable. value, Context the context)Context associated with the recovering sequence.Implements reactor. |
| public boolean | test(Throwable
the first input argument error, Object the second input argument value)Implements reactor. |
| errorConsumer | back to summary |
|---|---|
| pack-priv final BiConsumer<Throwable, Object> errorConsumer | |
| errorPredicate | back to summary |
|---|---|
| pack-priv final Predicate<Throwable> errorPredicate | |
| ResumeStrategy | back to summary |
|---|---|
| pack-priv ResumeStrategy(Predicate<Throwable> errorPredicate, BiConsumer<Throwable, Object> errorConsumer) | |
| process | back to summary |
|---|---|
| public Throwable process(Throwable error, Object value, Context context) Implements reactor. Doc from reactor. Process an error and the optional value that caused it (when applicable) in preparation for sequence resume, so that the error is not completely swallowed.
If the strategy cannot resume this kind of error (ie. | |
| test | back to summary |
|---|---|
| public boolean test(Throwable error, Object value) Implements reactor. Doc from java. Evaluates this predicate on the given arguments. | |