Interface GraphJob

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canShortcut()
      Returns true if the job can be told to stop running, but to still perform any final work before being done.
      void dispose()
      Call to immediately stop this job, ignoring any exceptions or state issues that arise.
      void execute​(GraphJobListener listener)
      Tells this job to do its work.
      boolean isFinished()
      Returns true if this job has finished its work
      void shortcut()
      Tells this job to stop running, but to still perform any final work before being done.
    • Method Detail

      • execute

        void execute​(GraphJobListener listener)
        Tells this job to do its work. This call will be on the Swing thread. It is required that the given listener be called on the Swing thread when the job is finished.
        Parameters:
        listener - the listener this job is expected to call when its work is finished
      • canShortcut

        boolean canShortcut()
        Returns true if the job can be told to stop running, but to still perform any final work before being done.
        Returns:
        true if the job can be shortcut
      • shortcut

        void shortcut()
        Tells this job to stop running, but to still perform any final work before being done.

        Note: if your job is multi-threaded, then you must make sure to end your thread and work before returning from this method. If that cannot be done in a timely manner, then your canShortcut() should return false.

      • isFinished

        boolean isFinished()
        Returns true if this job has finished its work
        Returns:
        true if this job has finished its work
      • dispose

        void dispose()
        Call to immediately stop this job, ignoring any exceptions or state issues that arise.