Package jadex.future

Class FutureFinishChecker

java.lang.Object
jadex.future.FutureFinishChecker

public class FutureFinishChecker extends Object
Allows monitoring a number of tasks (futures) and get a notification when set to finished (no more new tasks) and all tasks have been processed (futures notified).
  • Field Details

    • delegate

      protected IResultListener delegate
      The delegate to be notified.
    • tasks

      protected List tasks
      The list of future tasks to observe.
    • finished

      protected boolean finished
      Flag, if set to finished (no more tasks allowed and notfication when all tasks finished).
    • notified

      protected boolean notified
      Flag to remember that delegate was notified.
  • Constructor Details

    • FutureFinishChecker

      public FutureFinishChecker(IResultListener delegate)
      Create a new checker.
  • Method Details

    • addTask

      public void addTask(Future future)
      Add a task.
    • finished

      public void finished()
      Set to finished.
    • check

      public void check()
      Check if completed.