Package org.jboss.arquillian.spi

Examples of org.jboss.arquillian.spi.DeployableContainer


   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.suite.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, SuiteEvent event) throws Exception
   {
      DeployableContainer container = context.getServiceLoader().onlyOne(DeployableContainer.class);
     
      context.fire(new BeforeSetup());
      container.setup(context, context.get(Configuration.class));
      context.add(DeployableContainer.class, container);
      context.fire(new AfterSetup());
   }
View Full Code Here


   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.suite.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, ClassEvent event) throws Exception
   {
      DeployableContainer container = context.get(DeployableContainer.class);
      Validate.stateNotNull(container, "No " + DeployableContainer.class.getName() + " found in context");
     
      Archive<?> deployment = context.get(Archive.class);
      Validate.stateNotNull(deployment, "No " + Archive.class.getName() + " found in context");
     
      context.fire(new BeforeUnDeploy());
      container.undeploy(context, deployment);
      context.fire(new AfterUnDeploy());
   }
View Full Code Here

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.suite.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, SuiteEvent event) throws Exception
   {
      DeployableContainer container = context.get(DeployableContainer.class);
      Validate.stateNotNull(container, "No " + DeployableContainer.class.getName() + " found in context");
     
      context.fire(new BeforeStop());
      container.stop(context);
      context.fire(new AfterStop());
   }
View Full Code Here

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.suite.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, SuiteEvent event) throws Exception
   {
      DeployableContainer container = context.get(DeployableContainer.class);
      Validate.stateNotNull(container, "No " + DeployableContainer.class.getName() + " found in context");
     
      context.fire(new BeforeStart());
      container.start(context);
      context.fire(new AfterStart());
   }
View Full Code Here

public class ContainerDeployer implements EventHandler<ClassEvent>
{
  
   public void callback(Context context, ClassEvent event) throws Exception
   {
      DeployableContainer container = context.get(DeployableContainer.class);
      Validate.stateNotNull(container, "No " + DeployableContainer.class.getName() + " found in context");
     
      Archive<?> deployment = context.get(Archive.class);
      Validate.stateNotNull(deployment, "No " + Archive.class.getName() + " found in context");
     
      context.fire(new BeforeDeploy());
      ContainerMethodExecutor executor = container.deploy(context, deployment);
      context.add(ContainerMethodExecutor.class, executor);
      context.fire(new AfterDeploy());
   }
View Full Code Here

         controller = new InContainerContainer();
         deployer = new InContainerContainer();
      }
      else
      {
         DeployableContainer container = serviceLoader.onlyOne(DeployableContainer.class);
         // TODO: lookup controller / deployer from configuration
         controller = new ContainerController(container);
         deployer = new ContainerDeployer(container);
      }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.DeployableContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.