Task<T> class abstract

定义一个 Task 的抽象类

异步的任务,比如请求,批处理都可以继承这个类实现一个 Task

Implementers

Constructors

Task()

Properties

completer Completer<T>
getter/setter pair
future Future<T>
no setter
hashCode int
The hash code for this object.
no setterinherited
manager TaskManager
被添加到 TaskManager 后初始化
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createTask() Future<T>
创建任务的抽象方法
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postError(Object error) → void
createTask 的返回值出错之后调用
postReceive(T data) → void
createTask 的返回值接收到结果之后调用
postRestart() → void
Task 被重启之后执行,createTask 被重新调用后执行
postStart() → void
createTask 执行之后会调用
preRestart() → void
Task 被重启之前执行,Task.restart 调用后立即执行
preStart() → void
Task 启动之前会调用,该方法只会在第一次被 TaskManager 初始化的时候调用
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited