Interface LongTask<R>

  • Type Parameters:
    R - result type of the calculation

    public interface LongTask<R>
    When a custom UI need to do calculation that are long running this interface can be used.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void done​(R result)
      Once done the done method is called with the result.
      R process()
      Do the heavy calculation in this method.
    • Method Detail

      • process

        R process()
           throws java.lang.Exception
        Do the heavy calculation in this method. It will be performed outside the UI thread such that the UI will not hang.
        Throws:
        java.lang.Exception
      • done

        void done​(R result)
        Once done the done method is called with the result. This is taking place on the UI thread.
        Parameters:
        result - result of the processing