This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 82c9488fbe3e51e839502e9a6c34fc92123d0372
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 16 13:53:10 2023 +0000

    Refactor to make using custom endpoints easier
---
 java/org/apache/coyote/http11/Http11Nio2Protocol.java | 7 ++++++-
 java/org/apache/coyote/http11/Http11NioProtocol.java  | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11Nio2Protocol.java 
b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
index e30b41a552..84ce5fb946 100644
--- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java
+++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
@@ -31,7 +31,12 @@ public class Http11Nio2Protocol extends 
AbstractHttp11JsseProtocol<Nio2Channel>
 
 
     public Http11Nio2Protocol() {
-        super(new Nio2Endpoint());
+        this(new Nio2Endpoint());
+    }
+
+
+    public Http11Nio2Protocol(Nio2Endpoint endpoint) {
+        super(endpoint);
     }
 
 
diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java 
b/java/org/apache/coyote/http11/Http11NioProtocol.java
index f77e45bad9..1f52c6e7f0 100644
--- a/java/org/apache/coyote/http11/Http11NioProtocol.java
+++ b/java/org/apache/coyote/http11/Http11NioProtocol.java
@@ -36,7 +36,12 @@ public class Http11NioProtocol extends 
AbstractHttp11JsseProtocol<NioChannel> {
 
 
     public Http11NioProtocol() {
-        super(new NioEndpoint());
+        this(new NioEndpoint());
+    }
+
+
+    public Http11NioProtocol(NioEndpoint endpoint) {
+        super(endpoint);
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to