- Type Parameters:
T
- the type of the value computed by the task.
- All Superinterfaces:
EventListener
Listener interface for receiving task result events. The
handleTaskResult
method is called when the task returns
the computed value, or when the task throws an exception.-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleTaskResult
(TaskResultEvent<T> event) Called when the task returns the computed value, or when the task throws an exception.
-
Method Details
-
handleTaskResult
Called when the task returns the computed value, or when the task throws an exception. The value returned by the task can be retrieved with thegetValue
method. If the task terminated by throwing an exception, the exception can be retrieved using thegetError
method.- Parameters:
event
- describes the task result event.- Throws:
Exception
- if an error occurs.
-