*/
@SuppressWarnings("unchecked")
private void checkSocketFactory() throws Exception {
if ( !blocking && !secure) return;
SSLSelectorThread secureSel = (SSLSelectorThread)selectorThread;
if (secure) {
// The SSL setup code has been moved into
// SSLImplementation since SocketFactory doesn't
// provide a wide enough interface
sslImplementation =
SSLImplementation.getInstance(sslImplementationName);
socketFactory = sslImplementation.getServerSocketFactory();
secureSel.setSSLImplementation(sslImplementation);
secureSel.setEnabledCipherSuites(toStringArray(getCiphers()));
secureSel.setEnabledProtocols(toStringArray(getProtocols()));
String clientAuthStr = (String) getAttribute("clientauth");
if (clientAuthStr != null){
secureSel.setNeedClientAuth(Boolean.valueOf(clientAuthStr));
}
} else if (socketFactoryName != null) {
socketFactory = string2SocketFactory(socketFactoryName);
}