mx4j.server

Class ModifiableClassLoaderRepository

public abstract class ModifiableClassLoaderRepository extends Object implements ClassLoaderRepository

Base class to extend to create custom ClassLoaderRepositories. MX4J's MBeanServer can use a custom ClassLoaderRepository instead of the default one by simply specifying a suitable system property, see MX4JSystemKeys. It must be a class, otherwise it opens up a security hole, as anyone can cast the MBeanServer's ClassLoaderRepository down to this class and call addClassLoader or removeClassLoader since, if this class is an interface, they must be public.

Version: $Revision: 1.4 $

Method Summary
protected abstract voidaddClassLoader(ClassLoader cl)
Adds, if does not already exist, the specified ClassLoader to this repository.
protected abstract voidremoveClassLoader(ClassLoader cl)
Removes, if exists, the specified ClassLoader from this repository.

Method Detail

addClassLoader

protected abstract void addClassLoader(ClassLoader cl)
Adds, if does not already exist, the specified ClassLoader to this repository.

Parameters: cl The classloader to add

See Also: ModifiableClassLoaderRepository

removeClassLoader

protected abstract void removeClassLoader(ClassLoader cl)
Removes, if exists, the specified ClassLoader from this repository.

Parameters: cl The classloader to remove

See Also: ModifiableClassLoaderRepository

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.