File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/net/jodah/failsafe Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,18 @@ public class PolicyListeners<S, R> {
3333 EventListener successListener ;
3434
3535 /**
36- * Registers the {@code listener} to be called when an execution fails for a {@link Policy}.
36+ * Registers the {@code listener} to be called when a {@link Policy} fails to handle an execution. This means that not
37+ * only was the supplied execution considered a failure by the policy, but that the policy was unable to produce a
38+ * successful result.
3739 */
3840 public S onFailure (CheckedConsumer <? extends ExecutionCompletedEvent <R >> listener ) {
3941 failureListener = EventListener .of (Assert .notNull (listener , "listener" ));
4042 return (S ) this ;
4143 }
4244
4345 /**
44- * Registers the {@code listener} to be called when an execution is successful for a {@link Policy}.
46+ * Registers the {@code listener} to be called when a {@link Policy} succeeds in handling an execution. This means
47+ * that the supplied execution either succeeded, or if it failed, the policy was able to produce a successful result.
4548 */
4649 public S onSuccess (CheckedConsumer <? extends ExecutionCompletedEvent <R >> listener ) {
4750 successListener = EventListener .of (Assert .notNull (listener , "listener" ));
You can’t perform that action at this time.
0 commit comments