/** Create a new <code>ClassRealm</code>. * * @param id The realm id. * * @return The newly created realm. * * @throws DuplicateRealmException If this class-world already * contains a realm with the specified id. */ public ClassRealm newRealm(String id) throws DuplicateRealmException { if ( this.realms.containsKey( id ) ) { throw new DuplicateRealmException( this, id ); } DefaultClassRealm realm = new DefaultClassRealm( this, id ); this.realms.put( id, realm ); return realm; }
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { if ( realms.containsKey( id ) ) { throw new DuplicateRealmException( this, id ); } ClassRealm realm = null; if ( classLoader != null ) { realm = new DefaultClassRealm( this, id, classLoader ); realms.put( id, realm ); } else { realm = new DefaultClassRealm( this, id ); } realms.put( id, realm ); return realm; }
public ClassRealm newRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public ClassRealm createChildRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( realm.createChildRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( getWorld(), e.getId() ); } }
public ClassRealm createChildRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( realm.createChildRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( getWorld(), e.getId() ); } }
public void configureAdapter( InputStream is ) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { try { config.configure( is ); } catch ( org.codehaus.plexus.classworlds.launcher.ConfigurationException e ) { throw new ConfigurationException( e.getMessage() ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } catch ( org.codehaus.plexus.classworlds.realm.NoSuchRealmException e ) { throw new NoSuchRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } }
public void configureAdapter( InputStream is ) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { try { config.configure( is ); } catch ( org.codehaus.plexus.classworlds.launcher.ConfigurationException e ) { throw new ConfigurationException( e.getMessage() ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } catch ( org.codehaus.plexus.classworlds.realm.NoSuchRealmException e ) { throw new NoSuchRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } }