public interface GenericCompletionListener<F extends Future<?>> extends EventListener
While this listener can be used directly, it is advised to subclass
it to make it easier for the API user to work with. See the
OperationCompletionListener
as an example.
Modifier and Type | Method and Description |
---|---|
void |
onComplete(F future)
This method will be executed once the future completes.
|
void onComplete(F future) throws Exception
Completion includes both failure and success, so it is advised to always check the status and errors of the future.
future
- the future that got completed.Exception
- can potentially throw anything in the callback.Copyright © 2015. All rights reserved.