/** * Create the default domain<p> * * By default this just invokes {@link #createDomain(String)} with {@link #DEFAULT_DOMAIN_NAME} * * @return the default domain */ protected ClassLoaderDomain createDefaultDomain() { return createDomain(DEFAULT_DOMAIN_NAME); }
/** * Create the default domain<p> * * By default this just invokes {@link #createDomain(String)} with {@link #DEFAULT_DOMAIN_NAME} * * @return the default domain */ protected ClassLoaderDomain createDefaultDomain() { return createDomain(DEFAULT_DOMAIN_NAME); }
/** * Create and register a domain with the given parent classloading policy * * @param name the name of the domain * @param parentPolicy the parent classloading policy * @param parent the parent * @return the domain * @throws IllegalArgumentException for a null argument * @throws IllegalStateException if there already is a domain with that name */ public ClassLoaderDomain createAndRegisterDomain(String name, ParentPolicy parentPolicy, Loader parent) { ClassLoaderDomain result = createDomain(name); result.setParentPolicy(parentPolicy); result.setParent(parent); registerDomain(result); return result; }
/** * Create and register a domain with the given parent classloading policy * * @param name the name of the domain * @param parentPolicy the parent classloading policy * @param parent the parent * @param shutdownPolicy the shutdown policy * @param useLoadClassForParent the use classloader for parent flag * @return the domain * @throws IllegalArgumentException for a null argument * @throws IllegalStateException if there already is a domain with that name */ public ClassLoaderDomain createAndRegisterDomain(String name, ParentPolicy parentPolicy, Loader parent, ShutdownPolicy shutdownPolicy, Boolean useLoadClassForParent) { ClassLoaderDomain result = createDomain(name); if (result == null) throw new IllegalArgumentException("Created null domain: " + name); if (useLoadClassForParent != null) result.setUseLoadClassForParent(useLoadClassForParent); result.setParentPolicy(parentPolicy); result.setParent(parent); if (shutdownPolicy != null) result.setShutdownPolicy(shutdownPolicy); registerDomain(result); return result; }