Interface TaskItem
- All Known Implementing Classes:
IndexableTaskItem
public interface TaskItem
-
Method Summary
Modifier and TypeMethodDescriptionvoid
The method that gets called before invoking all the tasks in theTaskGroup
this task belongs to.rx.Completable
invokeAfterPostRunAsync
(boolean isGroupFaulted) The method that gets called after invocation of "post run" task items depends on this TaskItem.rx.Observable<Indexable>
invokeAsync
(TaskGroup.InvocationContext context) The method that gets called to perform the unit of work asynchronously.boolean
isHot()
result()
-
Method Details
-
result
Indexable result()- Returns:
- the result of the task invocation
-
beforeGroupInvoke
void beforeGroupInvoke()The method that gets called before invoking all the tasks in theTaskGroup
this task belongs to. -
isHot
boolean isHot()- Returns:
- true if the observable returned by invokeAsync(cxt) is a hot observable, false if its a cold observable.
-
invokeAsync
The method that gets called to perform the unit of work asynchronously.- Parameters:
context
- the context shared across the the all task items in the group this task item belongs to.- Returns:
- an observable upon subscription does the unit of work and produces
result of type
Indexable
-
invokeAfterPostRunAsync
rx.Completable invokeAfterPostRunAsync(boolean isGroupFaulted) The method that gets called after invocation of "post run" task items depends on this TaskItem.This method will be invoked only if this TaskItem had "post run" dependents.
- Parameters:
isGroupFaulted
- true if one or more tasks in the group this TaskItem belongs to are in faulted state.- Returns:
- a completable representing any asynchronous work initiated
-