ResourceFlow class

为离线包编排一组IFlow步骤的管道。

持有包信息、上报参数和监听器。Flows通过start顺序执行。 支持通过stop提前终止。

Constructors

ResourceFlow()

Properties

hashCode int
The hash code for this object.
no setterinherited
isStopped bool
管道是否已被停止。
no setter
packageInfo OfflinePackageInfo?
获取当前包信息。
no setter
reportParams FlowReportParams?
获取当前上报参数。
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFlow(IFlow flow) ResourceFlow
将flow步骤添加到管道。
error(Object err) → void
报告错误并通知监听器。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process() Future<void>
按顺序执行每个flow步骤,在步骤之间检查isStopped
setDone() → void
将flow标记为成功完成, 停止管道并通知监听器。
setFlowListener(FlowListener listener) ResourceFlow
设置flow监听器用于完成/错误回调。
setPackageInfo(OfflinePackageInfo info) ResourceFlow
设置此flow执行的包信息。
setReportParams(FlowReportParams params) ResourceFlow
设置监控的上报参数。
start() Future<void>
开始顺序执行所有flow步骤。
stop() → void
信号管道在当前步骤后停止。
toString() String
A string representation of this object.
inherited

Operators

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