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

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

commit 992bf9219b33d8ac2e694b44f8cb451c425441c1
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 da91eb3581..94c271e87f 100644
--- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java
+++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
@@ -32,7 +32,12 @@ public class Http11Nio2Protocol extends 
AbstractHttp11Protocol<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 9af112ceb5..a2839ac6d6 100644
--- a/java/org/apache/coyote/http11/Http11NioProtocol.java
+++ b/java/org/apache/coyote/http11/Http11NioProtocol.java
@@ -37,7 +37,12 @@ public class Http11NioProtocol extends 
AbstractHttp11Protocol<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