8040062: Need to add new methods in BaseSSLSocketImpl
authorxuelei
Mon, 14 Apr 2014 13:40:45 +0000
changeset 23883 9434a0a8208f
parent 23882 7dbf42ed83ef
child 23884 83a0354e0e7c
child 24182 0b88e9702fc5
8040062: Need to add new methods in BaseSSLSocketImpl Reviewed-by: mullan
jdk/src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java
--- a/jdk/src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java	Mon Apr 14 16:15:10 2014 +0400
+++ b/jdk/src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java	Mon Apr 14 13:40:45 2014 +0000
@@ -28,6 +28,7 @@
 import java.io.*;
 import java.nio.channels.SocketChannel;
 import java.net.*;
+import java.util.Set;
 
 import javax.net.ssl.*;
 
@@ -634,6 +635,34 @@
         }
     }
 
+    @Override
+    public <T> Socket setOption(SocketOption<T> name,
+            T value) throws IOException {
+        if (self == this) {
+            return super.setOption(name, value);
+        } else {
+            return self.setOption(name, value);
+        }
+    }
+
+    @Override
+    public <T> T getOption(SocketOption<T> name) throws IOException {
+        if (self == this) {
+            return super.getOption(name);
+        } else {
+            return self.getOption(name);
+        }
+    }
+
+    @Override
+    public Set<SocketOption<?>> supportedOptions() {
+        if (self == this) {
+            return super.supportedOptions();
+        } else {
+            return self.supportedOptions();
+        }
+    }
+
     boolean isLayered() {
         return (self != this);
     }