类 MonitorableProgressListener
java.lang.Object
com.obs.services.model.MonitorableProgressListener
- 所有已实现的接口:
ProgressListener
Implementation class of the data transmission listener that can monitor the running status of subprocesses
- 从以下版本开始:
- 3.20.3
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明final voidEnd a subtask.
Note: Generally, users are not advised to call this method, because calling this method may lead to failures of the waitingFinish and isRunning methods.final booleanCheck whether the request task is running.final voidreset()Reset the listener.
This method is used when a request is repeatedly used.final voidStart a subtask.
Note: Generally, users are not advised to call this method, because calling this method may lead to failures of the waitingFinish and isRunning methods.final booleanWait until the request task is completely executed.final booleanwaitingFinish(long timeout) Wait until the request task is completely executed.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.obs.services.model.ProgressListener
progressChanged
-
构造器详细资料
-
MonitorableProgressListener
public MonitorableProgressListener()
-
-
方法详细资料
-
isRunning
public final boolean isRunning()Check whether the request task is running.
This method is used by the parent thread to monitor whether the current thread has completely stopped running after the current thread executes the interrupt() method.- 返回:
- If there are still running subtasks, true is returned. Otherwise, false is returned.
- 从以下版本开始:
- 3.20.3
-
waitingFinish
Wait until the request task is completely executed. Before the task execution completes, this method is blocked.
This method is used to check whether the upload subtask is complete after the current thread executes the interrupt() method.- 返回:
- If the task is complete, true is returned. Otherwise, false is returned.
- 抛出:
InterruptedException- This exception is thrown when the thread is in waiting, sleep, or occupied state before or during the activity and the thread is interrupted.- 从以下版本开始:
- 3.20.3
-
waitingFinish
Wait until the request task is completely executed. Before the task is completely executed, the method is blocked until the timeout interval is exceeded.
This method is used to check whether the upload subtask is complete after the current thread executes the interrupt() method.- 参数:
timeout- Timeout interval, in milliseconds. If the parameter value is smaller than or equal to 0, the waiting never times out.- 返回:
- If the task is complete, true is returned. Otherwise, false is returned.
- 抛出:
InterruptedException- This exception is thrown when the thread is in waiting, sleep, or occupied state before or during the activity and the thread is interrupted.- 从以下版本开始:
- 3.20.3
-
startOneTask
public final void startOneTask()Start a subtask.
Note: Generally, users are not advised to call this method, because calling this method may lead to failures of the waitingFinish and isRunning methods. The SDK uses this method to adjust the number of running subtasks. The user determines whether the requested task is complete.
Reference:waitingFinish(long),isRunning()- 从以下版本开始:
- 3.20.3
-
finishOneTask
public final void finishOneTask()End a subtask.
Note: Generally, users are not advised to call this method, because calling this method may lead to failures of the waitingFinish and isRunning methods. The SDK uses this method to adjust the number of running subtasks. The user determines whether the requested task is complete.
Reference:waitingFinish(long),isRunning()- 从以下版本开始:
- 3.20.3
-
reset
public final void reset()Reset the listener.
This method is used when a request is repeatedly used.- 从以下版本开始:
- 3.20.3
-