public interface GatewayProgressManager extends ProgressManager
The running tasks publish updates by retrieving the current progress listener for their thread through the function on this interface. This method is used due to the way that methods are invoked by the client on the gateway.
The easiest way to use this system is to write a GatewayFunc annotated function, and use the "asyncInvoke" flag of that annotation. That will cause the function to be passed through this system automatically.
PUSH_PROTOCOL_UPDATE
Modifier and Type | Method and Description |
---|---|
void |
cancelTask(java.lang.String taskId)
Sets the canceled flag of the specified task.
|
TaskProgressListener |
getProgressListenerForThread()
Returns the TaskProgressListener registered for the calling thread.
|
java.util.List<TaskProgressState> |
getState()
Returns the current state of all running tasks.
|
java.lang.String |
runAsyncTask(GatewayProgressRunnable task)
Similar to
runAsyncTask(String, GatewayProgressRunnable) , but registers a task
that doesn't exist under a user session. |
java.lang.String |
runAsyncTask(java.lang.String sessionid,
GatewayProgressRunnable task)
Registers a task to run asynchronously.
|
java.lang.String runAsyncTask(java.lang.String sessionid, GatewayProgressRunnable task)
sessionid
- the client session that is interested in the progress of this task.task
- the runnable to execute.java.lang.String runAsyncTask(GatewayProgressRunnable task)
runAsyncTask(String, GatewayProgressRunnable)
, but registers a task
that doesn't exist under a user session.task
- void cancelTask(java.lang.String taskId)
taskId
- TaskProgressListener getProgressListenerForThread()
java.util.List<TaskProgressState> getState()