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

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

commit 79404d7009b06290e5ddb8fc95830bc8a53c7e1f
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/Http11AprProtocol.java  | 7 ++++++-
 java/org/apache/coyote/http11/Http11Nio2Protocol.java | 7 ++++++-
 java/org/apache/coyote/http11/Http11NioProtocol.java  | 7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11AprProtocol.java 
b/java/org/apache/coyote/http11/Http11AprProtocol.java
index b3e681d4f0..92b24022fb 100644
--- a/java/org/apache/coyote/http11/Http11AprProtocol.java
+++ b/java/org/apache/coyote/http11/Http11AprProtocol.java
@@ -38,7 +38,12 @@ public class Http11AprProtocol extends 
AbstractHttp11Protocol<Long> {
     private static final Log log = LogFactory.getLog(Http11AprProtocol.class);
 
     public Http11AprProtocol() {
-        super(new AprEndpoint());
+        this(new AprEndpoint());
+    }
+
+
+    public Http11AprProtocol(AprEndpoint endpoint) {
+        super(endpoint);
     }
 
 
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 43327f361b..ec6daabb5a 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