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 ofTask.Orchestrationmethods which are permitted aftersubscribe(Subscriber)is called. Oncesubscribe(Subscriber)is called, only two methods are permitted: moresubscribe(Subscriber)calls, orsubmit().- See Also:
Task.Orchestration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Task.Coordinator<T>submit()Submits theTaskfor orchestration by theTaskExecutorService.Task.SubscribedOrchestration<T>subscribe(Task.Subscriber<? super T> subscriber)Registers the specifiedTask.Subscriberas part of the orchestration of theTask.
-
-
-
Method Detail
-
subscribe
Task.SubscribedOrchestration<T> subscribe(Task.Subscriber<? super T> subscriber)
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:
Task.Collectable.subscribe(Subscriber)
-
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:
Task.Collectable.subscribe(Subscriber)
-
-