public static SocketFactory getSocketFactoryFromProperty ( Configuration conf , String propValue ) { try { Class < ? > theClass = conf . getClassByName ( propValue ) ; return ( SocketFactory ) ReflectionUtils . newInstance ( theClass , conf ) ; } catch ( ClassNotFoundException cnfe ) { throw new RuntimeException ( "Socket Factory class not found: " + cnfe ) ; } }
Get the socket factory corresponding to the given proxy URI . If the given proxy URI corresponds to an absence of configuration parameter returns null . If the URI is malformed raises an exception .