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 theTaskfor orchestration by theTaskExecutorService.subscribe(Task.Subscriber<? super T> subscriber) Registers the specifiedTask.Subscriberas part of the orchestration of theTask.
-
Method Details
-
subscribe
Registers the specifiedTask.Subscriberas part of the orchestration of theTask.This method may be used multiple times to register multiple
Task.Subscribers.This method is mutually exclusive to
Task.Orchestration.collect(Collector). To subscribe when using aTask.Collector, useTask.Collectable.subscribe(Subscriber)on theTask.Collectablereturned byTask.Orchestration.collect(Collector).- Parameters:
subscriber- theTask.Subscriber- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining - See Also:
-
submit
Task.Coordinator<T> submit()Submits theTaskfor orchestration by theTaskExecutorService.- Returns:
- a
Task.Coordinatorfor managing an orchestratedTaskand publishing of collected results toTask.Subscribers - See Also:
-