mx4j.server

Class ModifiableClassLoaderRepository

Implemented Interfaces:
javax.management.loading.ClassLoaderRepository
Known Direct Subclasses:
DefaultClassLoaderRepository

public abstract class ModifiableClassLoaderRepository
extends java.lang.Object
implements javax.management.loading.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 void
addClassLoader(ClassLoader cl)
Adds, if does not already exist, the specified ClassLoader to this repository.
protected abstract void
removeClassLoader(ClassLoader cl)
Removes, if exists, the specified ClassLoader from this repository.

Method Details

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

removeClassLoader

protected abstract void removeClassLoader(ClassLoader cl)
Removes, if exists, the specified ClassLoader from this repository.
Parameters:
cl - The classloader to remove

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