8040062: Need to add new methods in BaseSSLSocketImpl

Reviewed-by: mullan
This commit is contained in:
Xue-Lei Andrew Fan 2014-04-14 13:40:45 +00:00
parent 998176c65e
commit 34ace4a41a

View File

@ -28,6 +28,7 @@ package sun.security.ssl;
import java.io.*;
import java.nio.channels.SocketChannel;
import java.net.*;
import java.util.Set;
import javax.net.ssl.*;
@ -634,6 +635,34 @@ abstract class BaseSSLSocketImpl extends SSLSocket {
}
}
@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);
}