< prev index next >

src/java.base/share/classes/java/net/ServerSocket.java

Print this page

        

@@ -104,14 +104,13 @@
      * <p>
      * The maximum queue length for incoming connection indications (a
      * request to connect) is set to {@code 50}. If a connection
      * indication arrives when the queue is full, the connection is refused.
      * <p>
-     * If the application has specified a server socket implementation
-     * factory, that factory's {@code createSocketImpl} method is called to
-     * create the actual socket implementation. Otherwise a system-default
-     * socket implementation is created.
+     * If the application has specified a server socket factory, that
+     * factory's {@code createSocketImpl} method is called to create
+     * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager,
      * its {@code checkListen} method is called
      * with the {@code port} argument
      * as its argument to ensure the operation is allowed.

@@ -149,14 +148,13 @@
      * The maximum queue length for incoming connection indications (a
      * request to connect) is set to the {@code backlog} parameter. If
      * a connection indication arrives when the queue is full, the
      * connection is refused.
      * <p>
-     * If the application has specified a server socket implementation
-     * factory, that factory's {@code createSocketImpl} method is called to
-     * create the actual socket implementation. Otherwise a system-default
-     * socket implementation is created.
+     * If the application has specified a server socket factory, that
+     * factory's {@code createSocketImpl} method is called to create
+     * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager,
      * its {@code checkListen} method is called
      * with the {@code port} argument
      * as its argument to ensure the operation is allowed.

@@ -472,16 +470,10 @@
      * with {@code s.getInetAddress().getHostAddress()} and
      * {@code s.getPort()}
      * as its arguments to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
-     * @implNote
-     * An instance of this class using a system-default {@code SocketImpl}
-     * accepts sockets with a {@code SocketImpl} of the same type, regardless
-     * of the {@linkplain Socket#setSocketImplFactory(SocketImplFactory)
-     * client socket implementation factory}, if one has been set.
-     *
      * @exception  IOException  if an I/O error occurs when waiting for a
      *               connection.
      * @exception  SecurityException  if a security manager exists and its
      *             {@code checkAccept} method doesn't allow the operation.
      * @exception  SocketTimeoutException if a timeout was previously set with setSoTimeout and

@@ -507,37 +499,19 @@
     }
 
     /**
      * Subclasses of ServerSocket use this method to override accept()
      * to return their own subclass of socket.  So a FooServerSocket
-     * will typically hand this method a newly created, unbound, FooSocket.
-     * On return from implAccept the FooSocket will be connected to a client.
-     *
-     * <p> The behavior of this method is unspecified when invoked with a
-     * socket that is not newly created and unbound. Any socket options set
-     * on the given socket prior to invoking this method may or may not be
-     * preserved when the connection is accepted. It may not be possible to
-     * accept a connection when this socket has a {@code SocketImpl} of one
-     * type and the given socket has a {@code SocketImpl} of a completely
-     * different type.
-     *
-     * @implNote
-     * An instance of this class using a system-default {@code SocketImpl}
-     * can accept a connection with a Socket using a {@code SocketImpl} of
-     * the same type: {@code IOException} is thrown if the Socket is using
-     * a custom {@code SocketImpl}. An instance of this class using a
-     * custom {@code SocketImpl} cannot accept a connection with a Socket
-     * using a system-default {@code SocketImpl}.
+     * will typically hand this method an <i>empty</i> FooSocket.  On
+     * return from implAccept the FooSocket will be connected to a client.
      *
      * @param s the Socket
      * @throws java.nio.channels.IllegalBlockingModeException
      *         if this socket has an associated channel,
      *         and the channel is in non-blocking mode
      * @throws IOException if an I/O error occurs when waiting
-     *         for a connection, or if it is not possible for this socket
-     *         to accept a connection with the given socket
-     *
+     * for a connection.
      * @since   1.1
      * @revised 1.4
      * @spec JSR-51
      */
     protected final void implAccept(Socket s) throws IOException {
< prev index next >