public static interface Stage.OnTerminate extends Stage
The given action cannot determine in which state the stream is (error, completed or cancelled). Use
Stage.OnError
and Stage.OnComplete
if you need to distinguish between these cases.
The action must only be invoked once. If both upstream completes, and downstream cancels, at the same time, only one of those signals may trigger the invocation of action.
If this action is invoked as the result of an upstream completion or error, any RuntimeException
thrown
by the function must be propagated downstream as an error, replacing the exception that the consumer was
handling. If the action is invoked as the result of downstream cancellation, then any exceptions thrown by the
function must be ignored, and cancellation must be propagated upstream.
Stage.Cancel, Stage.Collect, Stage.Concat, Stage.Coupled, Stage.Distinct, Stage.DropWhile, Stage.Failed, Stage.Filter, Stage.FindFirst, Stage.FlatMap, Stage.FlatMapCompletionStage, Stage.FlatMapIterable, Stage.FromCompletionStage, Stage.FromCompletionStageNullable, Stage.Limit, Stage.Map, Stage.Of, Stage.OnComplete, Stage.OnError, Stage.OnErrorResume, Stage.OnErrorResumeWith, Stage.OnTerminate, Stage.Peek, Stage.ProcessorStage, Stage.PublisherStage, Stage.Skip, Stage.SubscriberStage, Stage.TakeWhile
Modifier and Type | Method and Description |
---|---|
Runnable |
getAction()
The action to execute.
|
Runnable getAction()
Copyright © 2019 Eclipse Foundation. All rights reserved.