/** * Load a glob into the specified classloader. * * @param line The path configuration line. * @param realm The realm to populate * @throws MalformedURLException If the line does not represent * a valid path element. * @throws FileNotFoundException If the line does not represent * a valid path element in the filesystem. */ protected void loadGlob( String line, ClassRealm realm ) throws MalformedURLException, FileNotFoundException { loadGlob( line, realm, false ); }
/** * Configure from a file. * * @param is The config input stream. * @throws IOException If an error occurs reading the config file. * @throws MalformedURLException If the config file contains invalid URLs. * @throws ConfigurationException If the config file is corrupt. * @throws DuplicateRealmException If the config file defines two realms * with the same id. * @throws NoSuchRealmException If the config file defines a main entry * point in a non-existent realm. */ public void configure( InputStream is ) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { Configurator configurator = new Configurator( this ); configurator.configure( is ); }
/** Construct. * * @param classWorld The classWorld to configure. */ public Configurator( ClassWorld world ) { setClassWorld( world ); }
line = line.trim(); if ( canIgnore( line ) ) constituent = filter( constituent ); loadGlob( constituent, curRealm ); associateRealms();
line = line.trim(); if ( canIgnore( line ) ) propertiesFileName = filter( conf.substring( usingLoc + 5 ).trim() ); value = filter( value ); System.setProperty( property, value ); constituent = filter( constituent ); loadGlob( constituent, curRealm ); constituent = filter( constituent ); loadGlob( constituent, curRealm, true ); associateRealms();
/** * Load a glob into the specified classloader. * * @param line The path configuration line. * @param realm The realm to populate * @throws MalformedURLException If the line does not represent * a valid path element. * @throws FileNotFoundException If the line does not represent * a valid path element in the filesystem. */ protected void loadGlob( String line, ClassRealm realm ) throws MalformedURLException, FileNotFoundException { loadGlob( line, realm, false ); }
/** Configure from a file. * * @param is The config input stream. * * @throws IOException If an error occurs reading the config file. * @throws MalformedURLException If the config file contains invalid URLs. * @throws ConfigurationException If the config file is corrupt. * @throws DuplicateRealmException If the config file defines two realms * with the same id. * @throws NoSuchRealmException If the config file defines a main entry * point in a non-existent realm. */ public void configure(InputStream is) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { Configurator configurator = new Configurator(this); configurator.configure(is); }
/** * Load a glob into the specified classloader. * * @param line The path configuration line. * @param realm The realm to populate * @throws MalformedURLException If the line does not represent * a valid path element. * @throws FileNotFoundException If the line does not represent * a valid path element in the filesystem. */ protected void loadGlob( String line, ClassRealm realm ) throws MalformedURLException, FileNotFoundException { loadGlob( line, realm, false ); }