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.2 $
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 javax.management.ObjectName DEFAULT_LOADER_REPOSITORY
          The JMX name of the parent LoaderRepository
 
Method Summary
static void createLoaderRepository(javax.management.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(javax.management.MBeanServer server, String repositoryClassName, javax.management.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(javax.management.MBeanServer server, javax.management.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 javax.management.ObjectName DEFAULT_LOADER_REPOSITORY
The JMX name of the parent LoaderRepository

Method Detail

parseRepositoryConfig

public static LoaderRepositoryFactory.LoaderRepositoryConfig parseRepositoryConfig(Element config)
                                                                            throws javax.management.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:
javax.management.MalformedObjectNameException

createLoaderRepository

public static void createLoaderRepository(javax.management.MBeanServer server,
                                          String repositoryClassName,
                                          javax.management.ObjectName repositoryName)
                                   throws javax.management.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:
javax.management.JMException - thrown on any failure to create or register the repository

createLoaderRepository

public static void createLoaderRepository(javax.management.MBeanServer server,
                                          LoaderRepositoryFactory.LoaderRepositoryConfig config)
                                   throws javax.management.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:
javax.management.JMException - thrown on any failure to create or register the repository

destroyLoaderRepository

public static void destroyLoaderRepository(javax.management.MBeanServer server,
                                           javax.management.ObjectName repositoryName)


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