< prev index next >

src/java.base/share/classes/javax/net/ssl/SSLEngine.java

Print this page

        

@@ -1037,10 +1037,59 @@
         throw new UnsupportedOperationException();
     }
 
 
     /**
+     * Registers an event listener to receive notifications that an
+     * SSL handshake has completed on this connection.
+     *
+     * @param listener the HandShake Completed event listener
+     * @see #startHandshake()
+     * @see #removeHandshakeCompletedListener(HandshakeCompletedListener)
+     * @throws IllegalArgumentException if the argument is null.
+     */
+    public abstract void addHandshakeCompletedListener(
+        HandshakeCompletedListener listener);
+
+
+    /**
+     * Removes a previously registered handshake completion listener.
+     *
+     * @param listener the HandShake Completed event listener
+     * @throws IllegalArgumentException if the listener is not registered,
+     * or the argument is null.
+     * @see #addHandshakeCompletedListener(HandshakeCompletedListener)
+     */
+    public abstract void removeHandshakeCompletedListener(
+        HandshakeCompletedListener listener);
+
+
+    /**
+     * Registers an event listener to get information or modify
+     * the control flow of an ongoing SSL handshake.
+     *
+     * @param listener the object providing callback methods.
+     * @throws IllegalArgumentException if the argument is null.
+     * @see #removeHandshakeListener(HandshakeListener)
+     */
+    public abstract void addHandshakeListener(
+        HandshakeListener listener);
+
+
+    /**
+     * Removes a previously registered HandshakeListener event listener.
+     *
+     * @param listener the object providing callback methods.
+     * @throws IllegalArgumentException if the listener is not registered,
+     * or the argument is null.
+     * @see #addHandshakeListener(HandshakeListener)
+     */
+    public abstract void removeHandshakeListener(
+        HandshakeListener listener);
+
+
+    /**
      * Initiates handshaking (initial or renegotiation) on this SSLEngine.
      * <P>
      * This method is not needed for the initial handshake, as the
      * {@code wrap()} and {@code unwrap()} methods will
      * implicitly call this method if handshaking has not already begun.
< prev index next >