< prev index next >

src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java

Print this page
rev 51958 : 8211122: Reduce the number of internal classes made accessible to jdk.unsupported
Reviewed-by: alanb, dfuchs, kvn


  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.net;
  27 
  28 import java.io.FileDescriptor;
  29 import java.net.SocketException;
  30 import java.net.SocketOption;
  31 import java.security.AccessController;
  32 import java.security.PrivilegedAction;
  33 import java.util.Collections;
  34 import java.util.HashSet;
  35 import java.util.Set;
  36 import jdk.internal.misc.JavaIOFileDescriptorAccess;
  37 import jdk.internal.misc.SharedSecrets;
  38 
  39 /**
  40  * Defines extended socket options, beyond those defined in
  41  * {@link java.net.StandardSocketOptions}. These options may be platform
  42  * specific.
  43  *
  44  * @since 1.8
  45  */
  46 public final class ExtendedSocketOptions {
  47 
  48     private static class ExtSocketOption<T> implements SocketOption<T> {
  49         private final String name;
  50         private final Class<T> type;
  51         ExtSocketOption(String name, Class<T> type) {
  52             this.name = name;
  53             this.type = type;
  54         }
  55         @Override public String name() { return name; }
  56         @Override public Class<T> type() { return type; }
  57         @Override public String toString() { return name; }




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.net;
  27 
  28 import java.io.FileDescriptor;
  29 import java.net.SocketException;
  30 import java.net.SocketOption;
  31 import java.security.AccessController;
  32 import java.security.PrivilegedAction;
  33 import java.util.Collections;
  34 import java.util.HashSet;
  35 import java.util.Set;
  36 import jdk.internal.access.JavaIOFileDescriptorAccess;
  37 import jdk.internal.access.SharedSecrets;
  38 
  39 /**
  40  * Defines extended socket options, beyond those defined in
  41  * {@link java.net.StandardSocketOptions}. These options may be platform
  42  * specific.
  43  *
  44  * @since 1.8
  45  */
  46 public final class ExtendedSocketOptions {
  47 
  48     private static class ExtSocketOption<T> implements SocketOption<T> {
  49         private final String name;
  50         private final Class<T> type;
  51         ExtSocketOption(String name, Class<T> type) {
  52             this.name = name;
  53             this.type = type;
  54         }
  55         @Override public String name() { return name; }
  56         @Override public Class<T> type() { return type; }
  57         @Override public String toString() { return name; }


< prev index next >