Class ClientProgressManager
- All Implemented Interfaces:
- ProgressManager
It can be accessed through the static getInstance function as well as through the ClientContext.
 The way the progress system works is that long running tasks (that is, any task that takes long enough that progress
 might be desired) are wrapped up as a AsyncClientTask, and are run through this manager.
 
 When a task is registered, a TaskHandle is returned, which can be used to monitor status, wait for a result,
 and get the return value of the asynchronous operation. It can also be used to cancel the task.
 
The class registering the operation does not need to worry about displaying status, as that is handled by the system. However, it is possible to "pause" the UI in situations where having a pop up display open is undesirable. Calling setUIPaused affects all outstanding progress operations, and should therefore be called very carefully.
 Tasks executing against the gateway
 It's important to note that the gateway has a separate notion of asynchronous tasks. For the best results, the
 progress system should be used on both sides, but they are fundamentally separate. As a result, operations on the
 gateway get their own UID. Asynchronous gateway operations, triggered from the designer (even if not through the
 progress system!), can publish updates to the designer progress manager. Thus it's possible that a progress dialog
 might be shown even when you are not using the client progress manager to run a task.
 
 In a normal, fully async setup, you would end up with the following progress updates:
 ClientOp
 GatewayOp
 GatewayOp
 GatewayOp
 ClientOp
 
The client operation and gateway operations are seen as two seperate tasks. Which is displayed is based on whether the first task is dominant. If the client task is dominant, it will stay displayed, and its progress will be updated. If not, the display will switch to the gateway task when it comes in, and will stay on that until it's finished.
More information about the way the gateway progress system works can be found on the GatewayProgressManager page.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classprotected classstatic interfaceprotected class
- 
Field SummaryFields inherited from interface com.inductiveautomation.ignition.common.gui.progress.ProgressManagerPUSH_PROTOCOL_UPDATE
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidvoidcancelTask(String uid) protected ExecutionManagerstatic ClientProgressManagerprotected org.apache.log4j.LoggerregisterGatewayTask(String taskId) protected voidvoid<T> voidrun(CompletableFuture<T> cf, Consumer<T> handler, Object owner) runTask(AsyncClientTask task) Executes the provided task asynchronously.runTask(AsyncClientTask task, boolean dominant) Executes a task.voidsetClientContext(ClientContext context) voidsetUIPaused(boolean value) voidshutdown()voidstartup()protected voidprotected voidupdateTask(TaskProgressState state) protected voidupdateUI()
- 
Method Details- 
getInstance
- 
startuppublic void startup()
- 
getExecutionManager
- 
getLoggerprotected org.apache.log4j.Logger getLogger()
- 
addListener
- 
removeListener
- 
setUIPausedpublic void setUIPaused(boolean value) 
- 
shutdownpublic void shutdown()
- 
runTaskExecutes the provided task asynchronously. Displays progress as appropriate, and will display an error box if the task execution throws an exception.Returns a TaskHandle that can be used to wait for the task to finish, cancel the task, etc. 
- 
runTaskExecutes a task. See runTask(task) for more info.- Parameters:
- dominant- true indicates that this task should be favored for display, and will spawn subtasks that it will account for in its progress.
 
- 
run
- 
cancelAllTaskspublic void cancelAllTasks()
- 
cancelTask
- 
updateTask
- 
registerGatewayTask
- 
registerTask
- 
unregisterTask
- 
updateUIprotected void updateUI()
- 
setClientContext
- 
getStates
 
-