com.obs.services.model

## 类 MonitorableProgressListener

- java.lang.Object
- - com.obs.services.model.MonitorableProgressListener

- 所有已实现的接口:
    ProgressListener

      public abstract class MonitorableProgressListener
      extends Object
      implements ProgressListener

  Implementation class of the data transmission listener that can monitor the running status of subprocesses
  从以下版本开始:
    3.20.3

- - ### 构造器概要

    构造器
    构造器和说明
    `MonitorableProgressListener()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `finishOneTask()` End a subtask.
    `boolean` | `isRunning()` Check whether the request task is running.
    `void` | `reset()` Reset the listener.
    `void` | `startOneTask()` Start a subtask.
    `boolean` | `waitingFinish()` Wait until the request task is completely executed.
    `boolean` | `waitingFinish(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

          public final boolean waitingFinish()
                                      throws InterruptedException

      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

          public final boolean waitingFinish(long timeout)
                                      throws InterruptedException

      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

Copyright © 2021. All rights reserved.