public abstract class TLSClosing extends java.lang.ObjectAll streams in Akka are unidirectional: while in a complex flow graph data may flow in multiple directions these individual flows are independent from each other. The difference between two half-duplex connections in opposite directions and a full-duplex connection is that the underlying transport is shared in the latter and tearing it down will end the data transfer in both directions.
When integrating a full-duplex transport medium that does not support half-closing (which means ending one direction of data transfer without ending the other) into a stream topology, there can be unexpected effects. Feeding a finite Source into this medium will close the connection after all elements have been sent, which means that possible replies may not be received in full. To support this type of usage, the sending and receiving of data on the same side (e.g. on the
Client) need to be coordinated such that it is known when all replies have been received. Only then should the transport be shut down.
To support these scenarios it is recommended that the full-duplex transport integration is configurable in terms of termination handling, which means that the user can optionally suppress the normal (closing) reaction to completion or cancellation events, as is expressed by the possible values of this type:
EagerClosemeans to not ignore signals -
IgnoreCancelmeans to not react to cancellation of the receiving side unless the sending side has already completed -
IgnoreCompletemeans to not react to the completion of the sending side unless the receiving side has already canceled -
IgnoreBothmeans to ignore the first termination signal—be that cancellation or completion—and only act upon the second one
Constructors Constructor Description
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description
ignoreBoth()Java API: obtain the