Package page.codeberg.friedolyn.util
Interface Task.FailureListener<ResultType>
- Type Parameters:
ResultType- The class of the result that the action executed produces.
- All Known Implementing Classes:
Task.TaskListener
- Enclosing class:
Task<ResultType>
public static interface Task.FailureListener<ResultType>
A subscriber exclusively interested in the
failure and the result of the action, but
in no other information.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonFailed(@NonNull Optional<ResultType> result) Called when the action has finished with errors or other unexpected behavior.
-
Method Details
-
onFailed
Called when the action has finished with errors or other unexpected behavior.- Parameters:
result- The end product generated by the action, if any. Its presence does NOT indicate success.- API Note:
- The result is an
Optionalbecause it is essentially a return value rather than an actual parameter in the traditional sense. This means that it's okay to useOptionalhere despite the fact that it was designed for API return values.
-