Package akka.http.impl.util
Class One2OneBidiFlow
- java.lang.Object
-
- akka.http.impl.util.One2OneBidiFlow
-
public class One2OneBidiFlow extends java.lang.Object
INTERNAL API
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
One2OneBidiFlow.One2OneBidi<I,O>
static class
One2OneBidiFlow.OutputTruncationException
static class
One2OneBidiFlow.OutputTruncationException$
static class
One2OneBidiFlow.UnexpectedOutputException
static class
One2OneBidiFlow.UnexpectedOutputException$
-
Constructor Summary
Constructors Constructor Description One2OneBidiFlow()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I,O>
akka.stream.scaladsl.BidiFlow<I,I,O,O,akka.NotUsed>apply(int maxPending, scala.Function1<java.lang.Object,java.lang.Throwable> outputTruncationException, scala.Function1<java.lang.Object,java.lang.Throwable> unexpectedOutputException)
Creates a genericBidiFlow
which verifies that another flow produces exactly one output element per input element, at the right time.
-
-
-
Method Detail
-
apply
public static <I,O> akka.stream.scaladsl.BidiFlow<I,I,O,O,akka.NotUsed> apply(int maxPending, scala.Function1<java.lang.Object,java.lang.Throwable> outputTruncationException, scala.Function1<java.lang.Object,java.lang.Throwable> unexpectedOutputException)
Creates a genericBidiFlow
which verifies that another flow produces exactly one output element per input element, at the right time. Specifically it
1. triggers an
UnexpectedOutputException
if the inner flow produces an output element before having consumed the respective input element. 2. triggers an
OutputTruncationException
if the inner flow completes before having produced an output element for every input element. 3. triggers anOutputTruncationException
if the inner flow cancels its inputs before the upstream completes its stream of inputs. 4. Backpressures the input side if the maximum number of pending output elements has been reached, which is given via themaxPending
parameter. You can use -1 to disable this feature.
- Parameters:
maxPending
- (undocumented)outputTruncationException
- (undocumented)unexpectedOutputException
- (undocumented)- Returns:
- (undocumented)
-
-