private DirectorySocket getDirectorySocket ( ) { DirectorySocket socket = null ; if ( ServiceDirectory . getServiceDirectoryConfig ( ) . containsProperty ( SD_API_DIRECTORY_SOCKET_PROVIDER_PROPERTY ) ) { String provider = ServiceDirectory . getServiceDirectoryConfig ( ) . getString ( SD_API_DIRECTORY_SOCKET_PROVIDER_PROPERTY ) ; try { Class < ? > provideClass = Class . forName ( provider ) ; if ( DirectorySocket . class . isAssignableFrom ( provideClass ) ) { socket = ( DirectorySocket ) provideClass . newInstance ( ) ; } } catch ( Exception e ) { LOGGER . warn ( "fail to initialize the DirectorySocket provider - " + provider , e ) ; } } if ( socket == null ) { return new WSDirectorySocket ( ) ; } else { return socket ; } }
Get the DirectorySoeckt .