From 603aa80fa9af53a6b4e342619e796b47bf7eff1a Mon Sep 17 00:00:00 2001 From: David Matejcek Date: Wed, 18 Nov 2020 13:25:45 +0100 Subject: [PATCH] Issue #2016 Fixed Tyrus dependency on HandshakeListener interface - moving this interface out is a breaking change Signed-off-by: David Matejcek --- .../org/glassfish/grizzly/ssl/HandshakeListener.java | 12 ------------ .../org/glassfish/grizzly/ssl/SSLBaseFilter.java | 11 +++++++++++ .../org/glassfish/grizzly/http2/AlpnSupport.java | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/HandshakeListener.java diff --git a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/HandshakeListener.java b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/HandshakeListener.java deleted file mode 100644 index 6c6f4870cf..0000000000 --- a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/HandshakeListener.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.glassfish.grizzly.ssl; - -import javax.net.ssl.SSLEngine; - -import org.glassfish.grizzly.Connection; - -public interface HandshakeListener { - void onInit(Connection connection, SSLEngine sslEngine); - void onStart(Connection connection); - void onComplete(Connection connection); - void onFailure(Connection connection, Throwable t); -} diff --git a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLBaseFilter.java b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLBaseFilter.java index fcef3dbd5d..59f8afd0d1 100644 --- a/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLBaseFilter.java +++ b/modules/grizzly/src/main/java/org/glassfish/grizzly/ssl/SSLBaseFilter.java @@ -1000,4 +1000,15 @@ public Buffer clone(final Connection connection, final Buffer originalMessage) { return originalMessage; } } + + + // don't move to own file, Tyrus has a dependency on this interface + public interface HandshakeListener { + default void onInit(Connection connection, SSLEngine sslEngine) { + // nothing + } + void onStart(Connection connection); + void onComplete(Connection connection); + void onFailure(Connection connection, Throwable t); + } } diff --git a/modules/http2/src/main/java/org/glassfish/grizzly/http2/AlpnSupport.java b/modules/http2/src/main/java/org/glassfish/grizzly/http2/AlpnSupport.java index 90046d0be8..9b34ab08e4 100644 --- a/modules/http2/src/main/java/org/glassfish/grizzly/http2/AlpnSupport.java +++ b/modules/http2/src/main/java/org/glassfish/grizzly/http2/AlpnSupport.java @@ -37,8 +37,8 @@ import org.glassfish.grizzly.npn.AlpnClientNegotiator; import org.glassfish.grizzly.npn.AlpnServerNegotiator; import org.glassfish.grizzly.npn.NegotiationSupport; -import org.glassfish.grizzly.ssl.HandshakeListener; import org.glassfish.grizzly.ssl.SSLBaseFilter; +import org.glassfish.grizzly.ssl.SSLBaseFilter.HandshakeListener; import org.glassfish.grizzly.ssl.SSLUtils; /**