Interface TaskResultListener<T>
- 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 TypeMethodDescriptionvoidhandleTaskResult(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 thegetValuemethod. If the task terminated by throwing an exception, the exception can be retrieved using thegetErrormethod.- Parameters:
event- describes the task result event.- Throws:
Exception- if an error occurs.
-