Class TLSClosing
- java.lang.Object
-
- akka.stream.TLSClosing
-
- Direct Known Subclasses:
EagerClose
,IgnoreBoth
,IgnoreCancel
,IgnoreComplete
public abstract class TLSClosing extends java.lang.Object
All 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:
-
EagerClose
means to not ignore signals -IgnoreCancel
means to not react to cancellation of the receiving side unless the sending side has already completed -IgnoreComplete
means to not react to the completion of the sending side unless the receiving side has already canceled -IgnoreBoth
means to ignore the first termination signal—be that cancellation or completion—and only act upon the second one
-
-
Constructor Summary
Constructors Constructor Description TLSClosing()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TLSClosing
eagerClose()
Java API: obtain theEagerClose
singleton value.static TLSClosing
ignoreBoth()
Java API: obtain theIgnoreBoth
singleton value.abstract boolean
ignoreCancel()
abstract boolean
ignoreComplete()
-
-
-
Method Detail
-
eagerClose
public static TLSClosing eagerClose()
Java API: obtain theEagerClose
singleton value.
-
ignoreBoth
public static TLSClosing ignoreBoth()
Java API: obtain theIgnoreBoth
singleton value.
-
ignoreCancel
public abstract boolean ignoreCancel()
-
ignoreComplete
public abstract boolean ignoreComplete()
-
-