org.jboss.mx.loading
Class LoaderRepositoryFactory

java.lang.Object
  extended byorg.jboss.mx.loading.LoaderRepositoryFactory

public class LoaderRepositoryFactory
extends Object

A factory for LoaderRepository instances. This is used to obtain repository instances for scoped class loading.

Version:
$Revision: 1.1.4.6 $
Author:
David Jencks, Scott.Stark@jboss.org

Nested Class Summary
static class LoaderRepositoryFactory.LoaderRepositoryConfig
          A class that represents the configuration of the a LoaderRepository.
static interface LoaderRepositoryFactory.LoaderRepositoryConfigParser
          The interface representing a LoaderRepository configuration parser.
 
Field Summary
static ObjectName DEFAULT_LOADER_REPOSITORY
          The JMX name of the parent LoaderRepository
 
Method Summary
static void createLoaderRepository(MBeanServer server, LoaderRepositoryFactory.LoaderRepositoryConfig config)
          Create and configure a LoaderRepository instance using the given config if there is not already an instance registered.
static void createLoaderRepository(MBeanServer server, String repositoryClassName, ObjectName repositoryName)
          Create a LoaderRepository instance of type repositoryClassName and register it under repositoryName if there is not already an instance registered.
static void destroyLoaderRepository(MBeanServer server, ObjectName repositoryName)
           
static LoaderRepositoryFactory.LoaderRepositoryConfig parseRepositoryConfig(Element config)
          Given a loader-repository element fragment like: jboss.test.cts:loader=cts-cmp2v2.ear ...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOADER_REPOSITORY

public static final ObjectName DEFAULT_LOADER_REPOSITORY
The JMX name of the parent LoaderRepository

Method Detail

parseRepositoryConfig

public static LoaderRepositoryFactory.LoaderRepositoryConfig parseRepositoryConfig(Element config)
                                                                            throws MalformedObjectNameException
Given a loader-repository element fragment like: jboss.test.cts:loader=cts-cmp2v2.ear ... create a LoaderRepositoryConfig representation.

Parameters:
config - the xml loader-repository element
Returns:
a LoaderRepositoryConfig representation of the config
Throws:
MalformedObjectNameException

createLoaderRepository

public static void createLoaderRepository(MBeanServer server,
                                          String repositoryClassName,
                                          ObjectName repositoryName)
                                   throws JMException
Create a LoaderRepository instance of type repositoryClassName and register it under repositoryName if there is not already an instance registered.

Parameters:
server - the MBeanServer to register with
repositoryClassName - the class which implements LoaderRepository
repositoryName - the JMX name to register under
Throws:
JMException - thrown on any failure to create or register the repository

createLoaderRepository

public static void createLoaderRepository(MBeanServer server,
                                          LoaderRepositoryFactory.LoaderRepositoryConfig config)
                                   throws JMException
Create and configure a LoaderRepository instance using the given config if there is not already an instance registered.

Parameters:
server - the MBeanServer to register with
config - the configuration information which will be used to create register and configure the LoaderRepository instance.
Throws:
JMException - thrown on any failure to create or register the repository

destroyLoaderRepository

public static void destroyLoaderRepository(MBeanServer server,
                                           ObjectName repositoryName)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.