Interface TaskResultListener<T>

Type Parameters:
T - the type of the value computed by the task.
All Superinterfaces:
EventListener

public interface TaskResultListener<T> extends 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 Type
    Method
    Description
    void
    Called when the task returns the computed value, or when the task throws an exception.
  • Method Details

    • handleTaskResult

      void handleTaskResult(TaskResultEvent<T> event) throws Exception
      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 the getValue method. If the task terminated by throwing an exception, the exception can be retrieved using the getError method.
      Parameters:
      event - describes the task result event.
      Throws:
      Exception - if an error occurs.