类 ProgressiveTask
java.lang.Object
com.huangjian.modbus4j.sero.util.ProgressiveTask
- 所有已实现的接口:
Runnable
Abstract ProgressiveTask class.
-
字段概要
字段 -
构造器概要
构造器构造器说明Constructor for ProgressiveTask.Constructor for ProgressiveTask. -
方法概要
修饰符和类型方法说明voidcancel()cancel.protected voiddeclareProgress(float progress) declareProgress.booleanisCancelled.booleanisCompleted.final voidrun()run.protected abstract voidrunImpl()Implementers of this method MUST return from it occasionally so that the cancelled status can be checked.
-
字段详细资料
-
completed
protected boolean completed
-
-
构造器详细资料
-
ProgressiveTask
public ProgressiveTask()Constructor for ProgressiveTask.
-
ProgressiveTask
Constructor for ProgressiveTask.
- 参数:
l- aProgressiveTaskListenerobject.
-
-
方法详细资料
-
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.
-
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.
-