public interface Context<Out> extends LifecycleContext
PushPullStage
and StatefulStage
.Modifier and Type | Method and Description |
---|---|
TerminationDirective |
absorbTermination()
Puts the stage in a finishing state so that
final elements can be pushed from
onPull . |
FreeDirective |
fail(java.lang.Throwable cause)
Cancel upstreams and complete downstreams with failure.
|
FreeDirective |
finish()
Cancel upstreams and complete downstreams successfully.
|
boolean |
isFinishing()
This returns
true after absorbTermination() has been used. |
UpstreamDirective |
pull()
Request for more elements from upstreams.
|
DownstreamDirective |
push(Out elem)
Push one element to downstreams.
|
DownstreamDirective |
pushAndFinish(Out elem)
Push one element to downstream immediately followed by
cancel of upstreams and complete of downstreams.
|
attributes, materializer
DownstreamDirective push(Out elem)
elem
- (undocumented)UpstreamDirective pull()
FreeDirective finish()
DownstreamDirective pushAndFinish(Out elem)
elem
- (undocumented)FreeDirective fail(java.lang.Throwable cause)
cause
- (undocumented)TerminationDirective absorbTermination()
onPull
.boolean isFinishing()
true
after absorbTermination()
has been used.