public interface IAsyncRunnable
AsyncContainer for a component that uses it.| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted(boolean cancelled,
Exception errorException)
This method gets called with your originating DomUI page "active" when the activity has completed.
|
void |
run(IProgress p)
This is the code to call on the newly created worker thread - it should do the long running task that
you want to execute in parallel.
|
void run(@Nonnull IProgress p) throws Exception
QContextManager.createUnmanagedContext() or
something similar to create a context usable within this task - and do not forget to release it either!onCompleted(boolean, Exception), and use
properly synchronized(!) member variables in your IAsyncRunnable implementation to create the new UI to show
after the task.p - Exceptionvoid onCompleted(boolean cancelled,
@Nullable
Exception errorException)
throws Exception
cancelled - When TRUE, the task was cancelled by the user.errorException - When non-null the run(IProgress) method terminated with an exception, and this is
that exception. You are supposed to do something with it since no other indication
of that error is reported to the user!! So throw this exception on, or display it on your page.ExceptionCopyright © 2017 etc.to. All rights reserved.