equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
24 */ |
24 */ |
25 |
25 |
26 package sun.security.ssl; |
26 package sun.security.ssl; |
27 |
27 |
28 import java.io.*; |
28 import java.io.*; |
|
29 import java.net.*; |
29 import java.nio.channels.SocketChannel; |
30 import java.nio.channels.SocketChannel; |
30 import java.net.*; |
|
31 import java.util.Set; |
31 import java.util.Set; |
32 |
|
33 import javax.net.ssl.*; |
32 import javax.net.ssl.*; |
34 |
33 |
35 /** |
34 /** |
36 * Abstract base class for SSLSocketImpl. Its purpose is to house code with |
35 * Abstract base class for SSLSocketImpl. |
37 * no SSL related logic (or no logic at all). This makes SSLSocketImpl shorter |
36 * |
38 * and easier to read. It contains a few constants and static methods plus |
37 * Its purpose is to house code with no SSL related logic (or no logic at all). |
39 * overridden java.net.Socket methods. |
38 * This makes SSLSocketImpl shorter and easier to read. It contains a few |
|
39 * constants and static methods plus overridden java.net.Socket methods. |
40 * |
40 * |
41 * Methods are defined final to ensure that they are not accidentally |
41 * Methods are defined final to ensure that they are not accidentally |
42 * overridden in SSLSocketImpl. |
42 * overridden in SSLSocketImpl. |
43 * |
43 * |
44 * @see javax.net.ssl.SSLSocket |
44 * @see javax.net.ssl.SSLSocket |
45 * @see SSLSocketImpl |
45 * @see SSLSocketImpl |
46 * |
|
47 */ |
46 */ |
48 abstract class BaseSSLSocketImpl extends SSLSocket { |
47 abstract class BaseSSLSocketImpl extends SSLSocket { |
49 |
48 |
50 /* |
49 /* |
51 * Normally "self" is "this" ... but not when this connection is |
50 * Normally "self" is "this" ... but not when this connection is |
90 */ |
89 */ |
91 private static final String PROP_NAME = |
90 private static final String PROP_NAME = |
92 "com.sun.net.ssl.requireCloseNotify"; |
91 "com.sun.net.ssl.requireCloseNotify"; |
93 |
92 |
94 static final boolean requireCloseNotify = |
93 static final boolean requireCloseNotify = |
95 Debug.getBooleanProperty(PROP_NAME, false); |
94 Utilities.getBooleanProperty(PROP_NAME, false); |
96 |
95 |
97 // |
96 // |
98 // MISC SOCKET METHODS |
97 // MISC SOCKET METHODS |
99 // |
98 // |
100 |
99 |