SubscriberWrapper
s.
Constructor takes two subscribers - downReader
and downWriter
. downReader
receives the application data (after it has
been decrypted by SSLFlowDelegate). downWriter
receives the network data (after it has
been encrypted by SSLFlowDelegate).
Method upstreamWriter()
returns a subscriber which should
be subscribed with a publisher which publishes application data
that can then be encrypted into network data by this SSLFlowDelegate and handed off to the
downWriter
.
Method upstreamReader()
returns a subscriber
which should be
subscribed with a publisher which publishes encrypted network data
that can then be decrypted into application data by this SSLFlowDelegate and handed off to the
downReader
.
Errors are reported to the downReader
subscriber.
The diagram below illustrates how the Flow.Subscribers are used in this class, and where they come from:
---------> data flow direction
| ^
upstreamWriter | | downReader
obtained from | | supplied to
upstreamWriter() | | constructor
v |
+-----------------------------------------------------------+
* decrypts *
* SSLFlowDelegate *
* encrypts *
+-----------------------------------------------------------+
| ^
downWriter | | upstreamReader
supplied to | | obtained from
constructor | | upstreamReader()
v |
Modifier and Type | Class and Description |
---|---|
pack-priv static class | |
public static class | |
public static interface | |
pack-priv class | SSLFlowDelegate.Reader
Processing function for incoming data. |
pack-priv class | SSLFlowDelegate.Writer
Processing function for outgoing data. |
Modifier and Type | Field and Description |
---|---|
pack-priv volatile int | |
pack-priv final CompletableFuture | |
pack-priv volatile int | |
pack-priv volatile boolean | |
pack-priv final Logger | |
private static final int | |
pack-priv final SSLEngine | |
pack-priv final Executor | |
private static final IntBinaryOperator | |
pack-priv final AtomicInteger | |
private static final int | |
private static final ByteBuffer | |
pack-priv final int | |
private static final boolean | |
pack-priv final SSLFlowDelegate. | |
private static final String | |
private static final int | NOT_HANDSHAKING
States for handshake. |
private static final ByteBuffer | |
pack-priv volatile int | |
pack-priv final SSLFlowDelegate. | |
private static final int | |
pack-priv final CompletableFuture | |
pack-priv final Consumer | |
private static final IntBinaryOperator | |
private static final int | |
pack-priv static AtomicInteger | |
private static final ByteBuffer | |
pack-priv final ConcurrentLinkedQueue | |
pack-priv final CompletableFuture | |
pack-priv boolean | |
private static final int | |
pack-priv final String | |
pack-priv final SSLFlowDelegate. | |
private static final int | |
pack-priv final CompletableFuture |
Access | Constructor and Description |
---|---|
public | SSLFlowDelegate(SSLEngine engine, Executor exec, Flow.
Creates an SSLFlowDelegate fed from two Flow.Subscribers. |
public | SSLFlowDelegate(SSLEngine engine, Executor exec, Consumer<ByteBuffer> recycler, Flow.
Creates an SSLFlowDelegate fed from two Flow.Subscribers. |
Modifier and Type | Method and Description |
---|---|
public CompletableFuture | alpn()
Returns a CompletableFuture<String> which completes after the initial handshake completes, and which contains the negotiated alpn. |
protected Throwable | |
private void | |
public boolean | Returns: true, if a close_notify was detected.Returns true if the SSLFlowDelegate has detected a TLS close_notify from the server. |
pack-priv void | connect(Flow.
The left hand side read sink (typically, the
HttpConnection read subscriber). downReader,The right hand side write sink (typically
the SocketTube write subscriber). downWriterConnects the read sink (downReader) to the SSLFlowDelegate Reader, and the write sink (downWriter) to the SSLFlowDelegate Writer. |
pack-priv final String | |
pack-priv SSLFlowDelegate. | |
private boolean | |
protected SubscriberWrapper. | |
private void | |
pack-priv final ByteBuffer | |
pack-priv final ByteBuffer | |
private void | |
public String | |
private void | |
private List | |
public void | |
private void | |
public boolean | |
private void | |
private static String | |
private Void | |
pack-priv boolean | |
public Flow. | |
public Flow. |