40 /** |
40 /** |
41 * The abstract class {@code SocketImpl} is a common superclass |
41 * The abstract class {@code SocketImpl} is a common superclass |
42 * of all classes that actually implement sockets. It is used to |
42 * of all classes that actually implement sockets. It is used to |
43 * create both client and server sockets. |
43 * create both client and server sockets. |
44 * |
44 * |
45 * @implNote The JDK historically used a {@code SocketImpl} implementation named |
45 * @implNote Client and server sockets created with the {@code Socket} and |
46 * <em>PlainSocketImpl</em>. This has been replaced by a newer implementation |
46 * {@code SocketServer} public constructors create a system/platform default |
47 * but the JDK continues to ship with the older implementation to allow code that |
47 * {@code SocketImpl}. The JDK historically used a {@code SocketImpl} |
48 * depends on unspecified behavior, that differs between the old and new |
48 * implementation type named "PlainSocketImpl" that has since been replaced by a |
49 * implementations, to continue to run. The old implementation will be used if |
49 * newer implementation. The JDK continues to ship with the older implementation |
50 * the Java virtual machine is started with the system property {@systemProperty |
50 * to allow code to run that depends on unspecified behavior that differs between |
51 * jdk.net.usePlainSocketImpl} set on the command line. The value of the system |
51 * the old and new implementations. The old implementation will be used if the |
52 * property is the string representation of a boolean. If set without a value |
52 * Java virtual machine is started with the system property {@systemProperty |
53 * then it defaults to {@code true}, hence running with {@code |
53 * jdk.net.usePlainSocketImpl} set on the command line. It may also be set in |
54 * -Djdk.net.usePlainSocketImpl} or {@code -Djdk.net.usePlainSocketImpl=true} |
54 * the JDK's network configuration file, located in {@code |
55 * will configure the Java virtual machine use the old implementation. |
55 * ${java.home}/conf/net.properties}, for cases where it needs to be set without |
|
56 * changing the command line. The value of the system property is the string |
|
57 * representation of a boolean. If set without a value then it defaults to {@code |
|
58 * true}, hence running with {@code -Djdk.net.usePlainSocketImpl} or {@code |
|
59 * -Djdk.net.usePlainSocketImpl=true} will configure the Java virtual machine |
|
60 * to use the old implementation. |
56 * |
61 * |
57 * @author unascribed |
62 * @author unascribed |
58 * @since 1.0 |
63 * @since 1.0 |
59 */ |
64 */ |
60 public abstract class SocketImpl implements SocketOptions { |
65 public abstract class SocketImpl implements SocketOptions { |