org.jboss.ejb3.test.mc.bootstrap
Class EmbeddedTestMcBootstrap

java.lang.Object
  extended by org.jboss.kernel.plugins.event.AbstractEventEmitter
      extended by org.jboss.kernel.plugins.AbstractKernelObject
          extended by org.jboss.kernel.plugins.bootstrap.AbstractBootstrap
              extended by org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap
                  extended by org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap
All Implemented Interfaces:
Runnable, org.jboss.kernel.spi.event.KernelEventEmitter, org.jboss.kernel.spi.KernelObject

public class EmbeddedTestMcBootstrap
extends org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap

EmbeddedTestMcBootstrap A MicroContainer Bootstrap for general use in testing runtimes

Version:
$Revision: $
Author:
ALR

Nested Class Summary
protected  class EmbeddedTestMcBootstrap.ShutdownDeployerThread
          ShutdownDeployerThread A Simple Thread that, when run, will shut down its deployer
 
Field Summary
 
Fields inherited from class org.jboss.kernel.plugins.bootstrap.AbstractBootstrap
config
 
Fields inherited from class org.jboss.kernel.plugins.AbstractKernelObject
kernel
 
Fields inherited from class org.jboss.kernel.plugins.event.AbstractEventEmitter
eventListenerRegistry, NULL, NULL_FILTER
 
Constructor Summary
EmbeddedTestMcBootstrap()
           
 
Method Summary
protected  void bootstrap()
           
static EmbeddedTestMcBootstrap createEmbeddedMcBootstrap()
          Creates, runs, and returns a new Embedded MC Bootstrap
 void deploy(Class<?> testClass)
          Deploy a URL in the form "fullyQualifiedClassName-beans.xml" constructed from the specified testClass
 void deploy(Class<?> testClass, String filename)
          Deploy a URL in the form "packageName.filename-beans.xml" constructed from the specified testClass and filename
 void deploy(ClassLoader cl, String url)
          Deploys the specified URL expressed as a String
 org.jboss.kernel.spi.deployment.KernelDeployment deploy(URL url)
          Deploys the specified URL
protected  org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer getDeployer()
           
 void installInstance(String name, Object instance)
           
<T> T
lookup(String name, Class<T> expectedType)
           
protected  void setDeployer(org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer deployer)
           
 void shutdown()
          Perform a clean shutdown.
 void undeploy(Class<?> testClass)
          Undeploy a URL in the form "fullyQualifiedClassName-beans.xml" constructed from the specified testClass
 void undeploy(Class<?> testClass, String filename)
          Undeploy a URL in the form "packageName.filename-beans.xml" constructed from the specified testClass and filename
 void undeploy(ClassLoader cl, String url)
          Undeploys the specified URL expressed as a String
 void undeploy(URL url)
          Undeploys the specified URL
 
Methods inherited from class org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap
getConfigProperties, main
 
Methods inherited from class org.jboss.kernel.plugins.bootstrap.AbstractBootstrap
getConfig, getKernel, run, setConfig
 
Methods inherited from class org.jboss.kernel.plugins.AbstractKernelObject
setKernel
 
Methods inherited from class org.jboss.kernel.plugins.event.AbstractEventEmitter
createEvent, fireKernelEvent, fireKernelEvent, hasListeners, nextEmitterSequence, registerListener, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.kernel.spi.event.KernelEventEmitter
fireKernelEvent, registerListener, unregisterListener
 

Constructor Detail

EmbeddedTestMcBootstrap

public EmbeddedTestMcBootstrap()
Method Detail

createEmbeddedMcBootstrap

public static EmbeddedTestMcBootstrap createEmbeddedMcBootstrap()
Creates, runs, and returns a new Embedded MC Bootstrap


bootstrap

protected void bootstrap()
                  throws Throwable
Overrides:
bootstrap in class org.jboss.kernel.plugins.bootstrap.AbstractBootstrap
Throws:
Throwable

deploy

public org.jboss.kernel.spi.deployment.KernelDeployment deploy(URL url)
Deploys the specified URL

Parameters:
url -

deploy

public void deploy(ClassLoader cl,
                   String url)
Deploys the specified URL expressed as a String

Parameters:
url -

deploy

public void deploy(Class<?> testClass)
Deploy a URL in the form "fullyQualifiedClassName-beans.xml" constructed from the specified testClass

Parameters:
testClass -

deploy

public void deploy(Class<?> testClass,
                   String filename)
Deploy a URL in the form "packageName.filename-beans.xml" constructed from the specified testClass and filename

Parameters:
testClass -
filename -

lookup

public <T> T lookup(String name,
                    Class<T> expectedType)
         throws Throwable
Parameters:
name -
Throws:
Throwable

undeploy

public void undeploy(URL url)
Undeploys the specified URL

Parameters:
url -

undeploy

public void undeploy(ClassLoader cl,
                     String url)
Undeploys the specified URL expressed as a String

Parameters:
url -

undeploy

public void undeploy(Class<?> testClass)
Undeploy a URL in the form "fullyQualifiedClassName-beans.xml" constructed from the specified testClass

Parameters:
testClass -

undeploy

public void undeploy(Class<?> testClass,
                     String filename)
Undeploy a URL in the form "packageName.filename-beans.xml" constructed from the specified testClass and filename

Parameters:
testClass -
filename -

getDeployer

protected org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer getDeployer()

setDeployer

protected void setDeployer(org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer deployer)

installInstance

public void installInstance(String name,
                            Object instance)
                     throws Throwable
Throws:
Throwable

shutdown

public void shutdown()
Perform a clean shutdown.



Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.