< prev index next >

src/java.base/share/classes/sun/security/ssl/SSLServerSocketFactoryImpl.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -26,21 +26,19 @@
 package sun.security.ssl;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.ServerSocket;
-
 import javax.net.ssl.SSLServerSocketFactory;
 
 /**
  * This class creates SSL server sockets.
  *
  * @author David Brownell
  */
-final
-public class SSLServerSocketFactoryImpl extends SSLServerSocketFactory
-{
+final public
+        class SSLServerSocketFactoryImpl extends SSLServerSocketFactory {
     private static final int DEFAULT_BACKLOG = 50;
     private SSLContextImpl context;
 
 
     /**

@@ -53,12 +51,11 @@
     }
 
     /**
      * Called from SSLContextImpl's getSSLServerSocketFactory().
      */
-    SSLServerSocketFactoryImpl (SSLContextImpl context)
-    {
+    SSLServerSocketFactoryImpl(SSLContextImpl context) {
         this.context = context;
     }
 
     /**
      * Returns an unbound server socket.

@@ -71,30 +68,27 @@
     public ServerSocket createServerSocket() throws IOException {
         return new SSLServerSocketImpl(context);
     }
 
     @Override
-    public ServerSocket createServerSocket (int port)
-    throws IOException
-    {
-        return new SSLServerSocketImpl (port, DEFAULT_BACKLOG, context);
+    public ServerSocket createServerSocket(
+            int port) throws IOException {
+        return new SSLServerSocketImpl (context, port, DEFAULT_BACKLOG);
     }
 
 
     @Override
-    public ServerSocket createServerSocket (int port, int backlog)
-    throws IOException
-    {
-        return new SSLServerSocketImpl (port, backlog, context);
+    public ServerSocket createServerSocket (
+            int port, int backlog) throws IOException {
+        return new SSLServerSocketImpl (context, port, backlog);
     }
 
     @Override
     public ServerSocket
-    createServerSocket (int port, int backlog, InetAddress ifAddress)
-    throws IOException
-    {
-        return new SSLServerSocketImpl (port, backlog, ifAddress, context);
+    createServerSocket (int port,
+            int backlog, InetAddress ifAddress) throws IOException {
+        return new SSLServerSocketImpl (context, port, backlog, ifAddress);
     }
 
     /**
      * Returns the subset of the supported cipher suites which are
      * enabled by default.  These cipher suites all provide a minimum

@@ -102,11 +96,11 @@
      * (preventing person-in-the-middle attacks) and where traffic
      * is encrypted to provide confidentiality.
      */
     @Override
     public String[] getDefaultCipherSuites() {
-        return context.getDefaultCipherSuiteList(true).toStringArray();
+        return CipherSuite.namesOf(context.getDefaultCipherSuites(true));
     }
 
     /**
      * Returns the names of the cipher suites which could be enabled for use
      * on an SSL connection.  Normally, only a subset of these will actually

@@ -117,9 +111,8 @@
      *
      * @return an array of cipher suite names
      */
     @Override
     public String[] getSupportedCipherSuites() {
-        return context.getSupportedCipherSuiteList().toStringArray();
+        return CipherSuite.namesOf(context.getSupportedCipherSuites());
     }
-
 }
< prev index next >