class SubSourceOutlet[T] extends AnyRef
Ordering
- Alphabetic
- By Inheritance
Inherited
- SubSourceOutlet
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new SubSourceOutlet(name: String)
Value Members
- def complete(): Unit
Complete this output port.
- def fail(ex: Throwable): Unit
Fail this output port.
- def isAvailable: Boolean
Returns
true
if this output port can be pushed. - def isClosed: Boolean
Returns
true
if this output port is closed, but caution THIS WORKS DIFFERENTLY THAN THE NORMAL isClosed(out).Returns
true
if this output port is closed, but caution THIS WORKS DIFFERENTLY THAN THE NORMAL isClosed(out). Due to possibly asynchronous shutdown it may not returntrue
immediately aftercomplete()
orfail()
have returned. - def push(elem: T): Unit
Push to this output port.
- def setHandler(handler: OutHandler): Unit
Set OutHandler for this dynamic output port; this needs to be done before the first substream callback can arrive.
- def source: [SourceShape[T], NotUsed]
Get the Source for this dynamic output port.
- def timeout(d: FiniteDuration): Unit
Set the source into timed-out mode if it has not yet been materialized.
- def toString(): String
- Definition Classes
- SubSourceOutlet → AnyRef → Any
INTERNAL API
This allows the dynamic creation of an Outlet for a GraphStage which is connected to a Source that is available for materialization (e.g. using the
subFusingMaterializer
). Completion, cancellation and failure of the parent operator is automatically delegated to instances ofSubSourceOutlet
to avoid resource leaks.Even so it is good practice to use the
timeout
method to cancel this Outlet in case the corresponding Source is not materialized within a given time limit, see e.g. ActorMaterializerSettings.To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as
onPush
andonPull
.