Skip to content

Commit

Permalink
Experiment with IteratingCallback
Browse files Browse the repository at this point in the history
The previous semantic of `onCompleteFailure` has been renamed to `onFailure(Throwable)`, which is called immediately (but serialized) on either an abort or a failure.   A new `onCompleteFailure(Throwable)` method has been added that is called only after a `failed(throwable)` or a `abort(Throwable)` followed by `succeeded()` or `failed(Throwable)``

No usage has yet been made of the new `onCompleteFailure`, but the ICB implementation has been completely replaced by the one developed in #11876
  • Loading branch information
gregw committed Jul 16, 2024
1 parent 6858307 commit 2b60a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,13 @@
* <p>
* Subclasses must implement method {@link #process()} where the
* asynchronous sub-task is initiated and a suitable {@link Action}
* is returned to this callback to indicate the overall progress ofk
* is returned to this callback to indicate the overall progress of
* the large asynchronous task.
* This callback is passed to the asynchronous sub-task, and a call
* to {@link #succeeded()} on this callback represents the successful
* completion of the asynchronous sub-task, while a call to
* {@link #failed(Throwable)} on this callback represents the
* completion with a failure of the large asynchronous task.
* <p>
* For most purposes, the {@link #succeeded()} and {@link #failed(Throwable)}
* methods of this class should be considered final, and only overridden in
* extraordinary circumstances. Any action taken in such extensions are not
* serialized.
*/
public abstract class IteratingCallback implements Callback
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ protected void onRequestContent(HttpServletRequest request, Request proxyRequest
}

@Override
public void failed(Throwable x)
public void onFailure(Throwable x)
{
super.failed(x);
super.onFailure(x);
onError(x);
}
}
Expand Down

0 comments on commit 2b60a6d

Please sign in to comment.