question: @ SuppressWarnings ( "unchecked" ) public RegistryContext ( String host , int port , Hashtable < ? , ? > env ) throws NamingException { environment = ( env == null ) ? new Hashtable < String , Object > ( 5 ) : ( Hashtable < String , Object > ) env ; if ( environment . get ( SECURITY_MGR ) != null ) { installSecurityMgr ( ) ; } if ( ( host != null ) && ( host . charAt ( 0 ) == '[' ) ) { host = host . substring ( 1 , host . length ( ) - 1 ) ; } RMIClientSocketFactory socketFactory = ( RMIClientSocketFactory ) environment . get ( SOCKET_FACTORY ) ; registry = getRegistry ( host , port , socketFactory ) ; this . host = host ; this . port = port ; }
target:  Returns a context for the registry at a given host and port. If "host" is null, uses default host. If "port" is non-positive, uses default port. Cloning of "env" is handled by caller; see comments within RegistryContextFactory.getObjectInstance(), for example.