Package io.jmix.imapui.screen.message
Class ImapMessageEdit.InitAttachmentTask
java.lang.Object
io.jmix.ui.executor.BackgroundTask<Integer,Integer>
io.jmix.imapui.screen.message.ImapMessageEdit.InitAttachmentTask
- Enclosing class:
- ImapMessageEdit
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.executor.BackgroundTask
BackgroundTask.ProgressListener<T,
V>, BackgroundTask.ProgressListenerAdapter<T, V> -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
canceled()
Called by the execution environment in UI thread if the task is canceled byBackgroundTaskHandler.cancel()
invocation.void
Called by the execution environment in UI thread when the task is completed.void
Called by the execution environment in UI thread on progress change.run
(TaskLifeCycle<Integer> taskLifeCycle) Main method that performs a task.Methods inherited from class io.jmix.ui.executor.BackgroundTask
addProgressListener, getOwnerFrame, getOwnerScreen, getParams, getProgressListeners, getTimeoutMilliseconds, getTimeoutSeconds, handleException, handleTimeoutException, removeProgressListener
-
Field Details
-
msg
-
loadProgress
-
-
Method Details
-
run
Description copied from class:BackgroundTask
Main method that performs a task.
Called by the execution environment in a separate working thread.
Implementation of this method should support interruption:- In long loops check
TaskLifeCycle.isInterrupted()
and return if it is true - Don't swallow
InterruptedException
- return from the method or don't catch it at all
- Specified by:
run
in classBackgroundTask<Integer,
Integer> - Parameters:
taskLifeCycle
- lifecycle object that allows the main method to interact with the execution environment- Returns:
- task result
- In long loops check
-
canceled
public void canceled()Description copied from class:BackgroundTask
Called by the execution environment in UI thread if the task is canceled byBackgroundTaskHandler.cancel()
invocation.
This method is not called in case of timeout expiration or owner window closing.- Overrides:
canceled
in classBackgroundTask<Integer,
Integer>
-
done
Description copied from class:BackgroundTask
Called by the execution environment in UI thread when the task is completed.- Overrides:
done
in classBackgroundTask<Integer,
Integer> - Parameters:
attachmentCount
- result of execution returned byBackgroundTask.run(TaskLifeCycle)
method
-
progress
Description copied from class:BackgroundTask
Called by the execution environment in UI thread on progress change.- Overrides:
progress
in classBackgroundTask<Integer,
Integer> - Parameters:
changes
- list of changes since previous invocation
-