类 ProgressiveTask

java.lang.Object
com.huangjian.modbus4j.sero.util.ProgressiveTask
所有已实现的接口:
Runnable

public abstract class ProgressiveTask extends Object implements Runnable

Abstract ProgressiveTask class.

  • 字段详细资料

    • completed

      protected boolean completed
  • 构造器详细资料

  • 方法详细资料

    • cancel

      public void cancel()

      cancel.

    • isCancelled

      public boolean isCancelled()

      isCancelled.

      返回:
      a boolean.
    • isCompleted

      public boolean isCompleted()

      isCompleted.

      返回:
      a boolean.
    • run

      public final void run()

      run.

      指定者:
      run 在接口中 Runnable
    • declareProgress

      protected void declareProgress(float progress)

      declareProgress.

      参数:
      progress - a float.
    • runImpl

      protected abstract void runImpl()
      Implementers of this method MUST return from it occasionally so that the cancelled status can be checked. Each return must leave the class and thread state with the expectation that runImpl will not be called again, while acknowledging the possibility that it will. Implementations SHOULD call the declareProgress method with each runImpl execution such that the listener can be notified. Implementations MUST set the completed field to true when the task is finished.