Interface Work.Body<T>

Type Parameters:
T - the type the body produces
Enclosing class:
Work<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Work.Body<T>
The background body. Runs on the worker pool, never on the UI thread, and must not touch widget or scene state; it hands its result back through Work.onSuccess, which does run on the UI thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    run(Progress progress)
     
  • Method Details

    • run

      T run(Progress progress) throws Exception
      Parameters:
      progress - the job's own handle: cancellation and reporting
      Returns:
      the value handed to the success callback; may be null
      Throws:
      Exception - any failure, checked or not; it is routed to the failure callback on the UI thread rather than killing the worker thread