org.jboss.deployers.plugins.classloading
Class AbstractClassLoaderSystemDeployer

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
      extended by org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer
          extended by org.jboss.deployers.plugins.classloading.AbstractClassLoaderSystemDeployer
All Implemented Interfaces:
org.jboss.deployers.spi.deployer.Deployer, org.jboss.deployers.spi.Ordered, org.jboss.deployers.structure.spi.ClassLoaderFactory

public abstract class AbstractClassLoaderSystemDeployer
extends org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer

A system class loader deployer.

Version:
$Revision: 69266 $
Author:
Adrian Brock, Scott.Stark@jboss.org

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
org.jboss.deployers.spi.Ordered.OrderedComparator
 
Field Summary
 
Fields inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
log
 
Fields inherited from interface org.jboss.deployers.spi.Ordered
COMPARATOR
 
Constructor Summary
AbstractClassLoaderSystemDeployer()
           
 
Method Summary
protected  void cleanup(org.jboss.deployers.structure.spi.DeploymentContext context, Module module)
          Hook to perform cleanup on destruction of classloaader
 ClassLoader createClassLoader(org.jboss.deployers.structure.spi.DeploymentContext context)
           
protected abstract  org.jboss.classloader.spi.ClassLoaderPolicy createClassLoaderPolicy(org.jboss.deployers.structure.spi.DeploymentContext context, Module module)
          Create a deployment classloader policy
 ClassLoading getClassLoading()
          Get the classLoading.
 MBeanServer getMbeanServer()
          Get the mbeanServer.
 org.jboss.classloader.spi.ClassLoaderSystem getSystem()
          Get the system.
protected  void registerClassLoaderWithMBeanServer(ClassLoader classLoader)
          Register the classloader with the mbeanserver
 void removeClassLoader(org.jboss.deployers.structure.spi.DeploymentContext context)
           
 void setClassLoading(ClassLoading classLoading)
          Set the classLoading.
 void setMbeanServer(MBeanServer mbeanServer)
          Set the mbeanServer.
 void setSystem(org.jboss.classloader.spi.ClassLoaderSystem system)
          Set the system.
protected  void unregisterClassLoaderFromMBeanServer(ClassLoader classLoader)
          Unregister the classloader from the mbeanserver
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer
deploy, undeploy
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
addInput, addInput, addOutput, addOutput, getInput, getInputs, getOutput, getOutputs, getRelativeOrder, getStage, getType, isAllInputs, isComponentsOnly, isParentFirst, isTopLevelOnly, isWantComponents, setAllInputs, setComponentsOnly, setInput, setInputs, setInputs, setInputs, setOutput, setOutputs, setOutputs, setOutputs, setParentFirst, setRelativeOrder, setStage, setTopLevelOnly, setType, setWantComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractClassLoaderSystemDeployer

public AbstractClassLoaderSystemDeployer()
Method Detail

getClassLoading

public ClassLoading getClassLoading()
Get the classLoading.

Returns:
the classLoading.

setClassLoading

public void setClassLoading(ClassLoading classLoading)
Set the classLoading.

Parameters:
classLoading - the classLoading.

getSystem

public org.jboss.classloader.spi.ClassLoaderSystem getSystem()
Get the system.

Returns:
the system.

setSystem

public void setSystem(org.jboss.classloader.spi.ClassLoaderSystem system)
Set the system.

Parameters:
system - the system.

getMbeanServer

public MBeanServer getMbeanServer()
Get the mbeanServer.

Returns:
the mbeanServer.

setMbeanServer

public void setMbeanServer(MBeanServer mbeanServer)
Set the mbeanServer.

Parameters:
mbeanServer - the mbeanServer.

createClassLoader

public ClassLoader createClassLoader(org.jboss.deployers.structure.spi.DeploymentContext context)
                              throws Exception
Throws:
Exception

removeClassLoader

public void removeClassLoader(org.jboss.deployers.structure.spi.DeploymentContext context)
                       throws Exception
Specified by:
removeClassLoader in interface org.jboss.deployers.structure.spi.ClassLoaderFactory
Overrides:
removeClassLoader in class org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer
Throws:
Exception

createClassLoaderPolicy

protected abstract org.jboss.classloader.spi.ClassLoaderPolicy createClassLoaderPolicy(org.jboss.deployers.structure.spi.DeploymentContext context,
                                                                                       Module module)
                                                                                throws Exception
Create a deployment classloader policy

Parameters:
context - the deployment context
module - the module
Returns:
the classloader
Throws:
Exception - for any error

cleanup

protected void cleanup(org.jboss.deployers.structure.spi.DeploymentContext context,
                       Module module)
                throws Exception
Hook to perform cleanup on destruction of classloaader

Parameters:
context - the deployment context
module - the module
Throws:
Exception - for any error

registerClassLoaderWithMBeanServer

protected void registerClassLoaderWithMBeanServer(ClassLoader classLoader)
                                           throws Exception
Register the classloader with the mbeanserver

Parameters:
classLoader - the classloader
Throws:
Exception - for any error

unregisterClassLoaderFromMBeanServer

protected void unregisterClassLoaderFromMBeanServer(ClassLoader classLoader)
                                             throws Exception
Unregister the classloader from the mbeanserver

Parameters:
classLoader - the classloader
Throws:
Exception - for any error


Copyright © 2008 JBoss Inc.. All Rights Reserved.