ObservationParameters
The ObservationParameters
interface is used to set filter conditions for the IntermediateResultReceiver
, so that only intermediate results meeting specific conditions will be called back.
interface ObservationParameters {
getObservedResultUnitTypes(): number;
setObservedResultUnitTypes(types: number): void;
isResultUnitTypeObserved(type: EnumIntermediateResultUnitType): boolean;
addObservedTask(taskName): void;
removeObservedTask(taskName: string): void;
isTaskObserved(ctaskName: string): boolean;
}
getObservedResultUnitTypes
Gets the types of intermediate result units that have been observed.
getObservedResultUnitTypes(): number;
Return value
The observed types of intermediate result units.
setObservedResultUnitTypes
Sets the types of intermediate result units that have been observed.
setObservedResultUnitTypes(types: number): void;
Parameters
types
: The observed types of intermediate result units.
isResultUnitTypeObserved
Determines whether the specified result unit type was observed.
isResultUnitTypeObserved(type: EnumIntermediateResultUnitType): boolean;
Return value
Returns a boolean value indicating whether the specified result unit type was observed.
addObservedTask
Adds observed task name to be notified when relevant results are available.
addObservedTask(taskName): void;
Parameters
taskName
: The specified task name.
removeObservedTask
Remove the observed task name so that intermediate results generated by the task are not notified.
removeObservedTask(taskName: string): void;
Parameters
taskName
: The specified task name.
isTaskObserved
Determines whether the specified task was observed.
isTaskObserved(taskName: string): boolean;
Parameters
taskName
: The specified task name.
Return value
Returns a boolean value indicating whether the specified task was observed.