Class MBeanOperationResultScreen.OperationBackgroundTask
java.lang.Object
io.jmix.ui.executor.BackgroundTask<Long,Object>
io.jmix.ui.app.jmxconsole.screen.inspect.operation.MBeanOperationResultScreen.OperationBackgroundTask
- Enclosing class:
- MBeanOperationResultScreen
protected class MBeanOperationResultScreen.OperationBackgroundTask
extends BackgroundTask<Long,Object>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.executor.BackgroundTask
BackgroundTask.ProgressListener<T,V>, BackgroundTask.ProgressListenerAdapter<T, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOperationBackgroundTask(long timeoutSeconds, Screen screen) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by the execution environment in UI thread when the task is completed.booleanCalled by the execution environment in UI thread if the taskBackgroundTask.run(TaskLifeCycle)method raised an exception.booleanCalled by the execution environment in UI thread if the task timeout is exceeded.run(TaskLifeCycle<Long> taskLifeCycle) Main method that performs a task.protected voidMethods inherited from class io.jmix.ui.executor.BackgroundTask
addProgressListener, canceled, getOwnerFrame, getOwnerScreen, getParams, getProgressListeners, getTimeoutMilliseconds, getTimeoutSeconds, progress, removeProgressListener
-
Field Details
-
label
-
resultMessage
-
-
Constructor Details
-
OperationBackgroundTask
-
-
Method Details
-
run
Description copied from class:BackgroundTaskMain 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:
runin classBackgroundTask<Long,Object> - Parameters:
taskLifeCycle- lifecycle object that allows the main method to interact with the execution environment- Returns:
- task result
- Throws:
Exception- exception in working thread
- In long loops check
-
done
Description copied from class:BackgroundTaskCalled by the execution environment in UI thread when the task is completed.- Overrides:
donein classBackgroundTask<Long,Object> - Parameters:
res- result of execution returned byBackgroundTask.run(TaskLifeCycle)method
-
handleException
Description copied from class:BackgroundTaskCalled by the execution environment in UI thread if the taskBackgroundTask.run(TaskLifeCycle)method raised an exception.- Overrides:
handleExceptionin classBackgroundTask<Long,Object> - Parameters:
ex- exception- Returns:
- true if this method implementation actually handles the exception. Used for chaining handlers.
-
handleTimeoutException
public boolean handleTimeoutException()Description copied from class:BackgroundTaskCalled by the execution environment in UI thread if the task timeout is exceeded.- Overrides:
handleTimeoutExceptionin classBackgroundTask<Long,Object> - Returns:
- true if this method implementation actually handles this event. Used for chaining handlers.
-
showResult
protected void showResult()
-