Interface Task.SubscribedOrchestration<T>
- Type Parameters:
T
- the type of results produced by aTask
- All Known Subinterfaces:
Task.Orchestration<T>
public static interface Task.SubscribedOrchestration<T>
Defines the subset of
Task.Orchestration
methods which are permitted after
subscribe(Subscriber)
is called. Once subscribe(Subscriber)
is called, only two methods are permitted: more subscribe(Subscriber)
calls, or submit()
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionsubmit()
Submits theTask
for orchestration by theTaskExecutorService
.subscribe
(Task.Subscriber<? super T> subscriber) Registers the specifiedTask.Subscriber
as part of the orchestration of theTask
.
-
Method Details
-
subscribe
Registers the specifiedTask.Subscriber
as part of the orchestration of theTask
.This method may be used multiple times to register multiple
Task.Subscriber
s.This method is mutually exclusive to
Task.Orchestration.collect(Collector)
. To subscribe when using aTask.Collector
, useTask.Collectable.subscribe(Subscriber)
on theTask.Collectable
returned byTask.Orchestration.collect(Collector)
.- Parameters:
subscriber
- theTask.Subscriber
- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining - See Also:
-
submit
Task.Coordinator<T> submit()Submits theTask
for orchestration by theTaskExecutorService
.- Returns:
- a
Task.Coordinator
for managing an orchestratedTask
and publishing of collected results toTask.Subscriber
s - See Also:
-