- All Known Implementing Classes:
Callback.Completable
public interface Callback
Callback for Write events.
NOTE: We don't expose org.eclipse.jetty.util.Callback here as that would complicate matters with the WebAppContext's classloader isolation.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
-
Field Details
-
NOOP
-
-
Method Details
-
from
Creates a callback from the given success and failure lambdas.- Parameters:
success
- called when the callback succeedsfailure
- called when the callback fails- Returns:
- a new callback
-
succeed
default void succeed()Callback invoked when the write succeeds.
- See Also:
-
fail
Callback invoked when the write fails.
- Parameters:
x
- the reason for the write failure
-