Package javax.management.loading

Examples of javax.management.loading.ClassLoaderRepository


     * <b>Not supported</b>, unless the underlying MBeanServer is able
     * to return a {@link ModifiableClassLoaderRepository} which supports it.
     * @exception UnsupportedOperationException if unsupported.
     **/
    public void addClassLoader(ObjectName name, ClassLoader loader) {
  final ClassLoaderRepository clr = inner.getClassLoaderRepository();
  if (clr instanceof ModifiableClassLoaderRepository)
       ((ModifiableClassLoaderRepository)clr).
     addClassLoader(name,loader);
  else throw new UnsupportedOperationException(unsupported);
    }
View Full Code Here


     * <b>Not supported</b>, unless the underlying MBeanServer is able
     * to return a {@link ModifiableClassLoaderRepository} which supports it.
     * @exception UnsupportedOperationException if unsupported.
     **/
    public void removeClassLoader(ObjectName name) {
  final ClassLoaderRepository clr = inner.getClassLoaderRepository();
  if (clr instanceof ModifiableClassLoaderRepository)
       ((ModifiableClassLoaderRepository)clr).removeClassLoader(name);
  else throw new UnsupportedOperationException(unsupported);
    }
View Full Code Here

  catch (InstanceNotFoundException e) { return null; }
    }

    public final Class loadClass(String className)
  throws ClassNotFoundException {
  final ClassLoaderRepository clr = inner.getClassLoaderRepository();
  if (clr == null)
      throw new UnsupportedOperationException(unsupported);
  return  clr.loadClass(className);
    }
View Full Code Here

    }

   
    public final Class loadClassWithout(ClassLoader loader,String className)
  throws ClassNotFoundException
  final ClassLoaderRepository clr = inner.getClassLoaderRepository();
  if (clr == null)
      throw new UnsupportedOperationException(unsupported);
  return clr.loadClassWithout(loader,className);
    }
View Full Code Here

  return clr.loadClassWithout(loader,className);
    }

    public final Class loadClassBefore(ClassLoader loader,String className)
  throws ClassNotFoundException
  final ClassLoaderRepository clr = inner.getClassLoaderRepository();
  if (clr == null)
      throw new UnsupportedOperationException(unsupported);
  return clr.loadClassBefore(loader,className);
    }
View Full Code Here

    private  Class loadClass(String className)
        throws ClassNotFoundException {
        try {
            return Class.forName(className);
        } catch (ClassNotFoundException e) {
            final ClassLoaderRepository clr =
                getClassLoaderRepository();
            if (clr == null) throw new ClassNotFoundException(className);
            return clr.loadClass(className);
        }
    }
View Full Code Here

    public ClassLoader getClassLoader(ObjectName objectName) throws InstanceNotFoundException {
        throw new SecurityException("Operation not allowed");
    }

    public ClassLoaderRepository getClassLoaderRepository() {
        return new ClassLoaderRepository() {
            public Class loadClass(String className) throws ClassNotFoundException {
                throw new ClassNotFoundException(className);
            }

            public Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException {
View Full Code Here

TOP

Related Classes of javax.management.loading.ClassLoaderRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.