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 Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDeprecated.protected classDeprecated.static interfaceDeprecated.protected classDeprecated. -
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.gui.progress.ProgressManager
PUSH_PROTOCOL_UPDATE -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidcancelTask(String uid) Deprecated.protected ExecutionManagerDeprecated.static ClientProgressManagerDeprecated.protected org.apache.log4j.LoggerDeprecated.Deprecated.registerGatewayTask(String taskId) Deprecated.protected voidDeprecated.voidDeprecated.runTask(AsyncClientTask task) Deprecated.Executes the provided task asynchronously.voidsetClientContext(ClientContext context) Deprecated.voidsetUIPaused(boolean value) Deprecated.voidshutdown()Deprecated.voidstartup()Deprecated.protected voidDeprecated.protected voidupdateTask(TaskProgressState state) Deprecated.protected voidupdateUI()Deprecated.
-
Method Details
-
getInstance
Deprecated. -
startup
public void startup()Deprecated. -
getExecutionManager
Deprecated. -
getLogger
protected org.apache.log4j.Logger getLogger()Deprecated. -
addListener
Deprecated. -
removeListener
Deprecated. -
setUIPaused
public void setUIPaused(boolean value) Deprecated. -
shutdown
public void shutdown()Deprecated. -
runTask
Deprecated.Executes 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.
-
cancelTask
Deprecated. -
updateTask
Deprecated. -
registerGatewayTask
Deprecated. -
registerTask
Deprecated. -
unregisterTask
Deprecated. -
updateUI
protected void updateUI()Deprecated. -
setClientContext
Deprecated. -
getStates
Deprecated.
-
Taskif you want platform managed UI for an asynchronous task.