src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java
branchhttp-client-branch
changeset 56474 fe2bf7b369b8
parent 56451 9585061fdb04
child 56507 2294c51eae30
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java	Thu Apr 19 16:47:52 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java	Mon Apr 23 15:45:40 2018 +0100
@@ -77,6 +77,13 @@
     private volatile boolean finished;
 
     public SSLTube(SSLEngine engine, Executor executor, FlowTube tube) {
+        this(engine, executor, null, tube);
+    }
+
+    public SSLTube(SSLEngine engine,
+                   Executor executor,
+                   Consumer<ByteBuffer> recycler,
+                   FlowTube tube) {
         Objects.requireNonNull(engine);
         Objects.requireNonNull(executor);
         this.tube = Objects.requireNonNull(tube);
@@ -85,15 +92,17 @@
         this.engine = engine;
         sslDelegate = new SSLTubeFlowDelegate(engine,
                                               executor,
+                                              recycler,
                                               readSubscriber,
                                               tube);
     }
 
     final class SSLTubeFlowDelegate extends SSLFlowDelegate {
         SSLTubeFlowDelegate(SSLEngine engine, Executor executor,
+                            Consumer<ByteBuffer> recycler,
                             SSLSubscriberWrapper readSubscriber,
                             FlowTube tube) {
-            super(engine, executor, readSubscriber, tube);
+            super(engine, executor, recycler, readSubscriber, tube);
         }
         protected SchedulingAction enterReadScheduling() {
             readSubscriber.processPendingSubscriber();