Package org.jboss.deployers.client.spi

Examples of org.jboss.deployers.client.spi.DeployerClient


      }
   }

   public void testInputOutputTransient() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test");
      addDeployer(main, deployer1);
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("test");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("test");
      deployer2.setOutputs("test");
      addDeployer(main, deployer2);

      Deployment deployment = createSimpleDeployment("transient");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(4, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(7, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(9, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
View Full Code Here


      assertEquals(4, deployer3.getUndeployOrder());
   }

   public void testInputOutputTransient2() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setInputs("test");
      deployer1.setOutputs("test");
      addDeployer(main, deployer1);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("test");
      addDeployer(main, deployer2);

      Deployment deployment = createSimpleDeployment("transient2");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
      assertEquals(3, deployer2.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(5, deployer1.getDeployOrder());
      assertEquals(6, deployer2.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
      assertEquals(3, deployer2.getUndeployOrder());
View Full Code Here

      assertEquals(3, deployer2.getUndeployOrder());
   }

   public void testInputOutputMultipleTransient() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer4 = new TestFlowDeployer("4");
      deployer4.setInputs("test");
      addDeployer(main, deployer4);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("test");
      deployer2.setOutputs("test");
      addDeployer(main, deployer2);
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("test");
      deployer3.setOutputs("test");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test");
      addDeployer(main, deployer1);

      Deployment deployment = createSimpleDeployment("transient");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());
      assertEquals(-1, deployer4.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(8, deployer1.getUndeployOrder());
      assertEquals(7, deployer2.getUndeployOrder());
      assertEquals(6, deployer3.getUndeployOrder());
      assertEquals(5, deployer4.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(9, deployer1.getDeployOrder());
      assertEquals(10, deployer2.getDeployOrder());
      assertEquals(11, deployer3.getDeployOrder());
      assertEquals(12, deployer4.getDeployOrder());
View Full Code Here

      assertEquals(5, deployer4.getUndeployOrder());
   }

   public void testMultipleOutput() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test1", "test2");
      addDeployer(main, deployer1);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("test1");
      addDeployer(main, deployer2);
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("test2");
      addDeployer(main, deployer3);

      Deployment deployment = createSimpleDeployment("MultipleOutput");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(4, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(7, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(9, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
View Full Code Here

      assertEquals(4, deployer3.getUndeployOrder());
   }

   public void testMultipleInput() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("test1", "test2");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test1");
      addDeployer(main, deployer1);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setOutputs("test2");
      addDeployer(main, deployer2);

      Deployment deployment = createSimpleDeployment("MultipleInput");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(4, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(7, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(9, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
View Full Code Here

      assertEquals(4, deployer3.getUndeployOrder());
   }

   public void testChain() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("test2");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("test1");
      deployer2.setOutputs("test2");
      addDeployer(main, deployer2);
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test1");
      addDeployer(main, deployer1);

      Deployment deployment = createSimpleDeployment("Chain");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(4, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(7, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(9, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
View Full Code Here

      assertEquals(4, deployer3.getUndeployOrder());
   }

   public void testComplicated() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer6 = new TestFlowDeployer("6");
      deployer6.setInputs("test1", "test3");
      addDeployer(main, deployer6);
      TestFlowDeployer deployer5 = new TestFlowDeployer("5");
      deployer5.setInputs("test3");
      deployer5.setOutputs("test3");
      addDeployer(main, deployer5);
      TestFlowDeployer deployer4 = new TestFlowDeployer("4");
      deployer4.setInputs("test2");
      deployer4.setOutputs("test3");
      addDeployer(main, deployer4);
      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setOutputs("test2");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setOutputs("test1");
      addDeployer(main, deployer2);
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setOutputs("test1");
      addDeployer(main, deployer1);

      Deployment deployment = createSimpleDeployment("Complicated");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(5, deployer5.getDeployOrder());
      assertEquals(6, deployer6.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());
      assertEquals(-1, deployer4.getUndeployOrder());
      assertEquals(-1, deployer5.getUndeployOrder());
      assertEquals(-1, deployer6.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(4, deployer4.getDeployOrder());
      assertEquals(5, deployer5.getDeployOrder());
      assertEquals(6, deployer6.getDeployOrder());
      assertEquals(12, deployer1.getUndeployOrder());
      assertEquals(11, deployer2.getUndeployOrder());
      assertEquals(10, deployer3.getUndeployOrder());
      assertEquals(9, deployer4.getUndeployOrder());
      assertEquals(8, deployer5.getUndeployOrder());
      assertEquals(7, deployer6.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(13, deployer1.getDeployOrder());
      assertEquals(14, deployer2.getDeployOrder());
      assertEquals(15, deployer3.getDeployOrder());
      assertEquals(16, deployer4.getDeployOrder());
View Full Code Here

      assertEquals(7, deployer6.getUndeployOrder());
   }

   public void testIntermediateIsRelativelySorted() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer2 = new TestFlowDeployer("A");
      deployer2.setInputs("test1");
      addDeployer(main, deployer2);
      TestFlowDeployer deployer3 = new TestFlowDeployer("B");
      addDeployer(main, deployer3);
      TestFlowDeployer deployer1 = new TestFlowDeployer("C");
      deployer1.setOutputs("test1");
      addDeployer(main, deployer1);

      Deployment deployment = createSimpleDeployment("IntermediateIsRelativelySorted");
      main.addDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(1, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(3, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(4, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(7, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(9, deployer3.getDeployOrder());
      assertEquals(6, deployer1.getUndeployOrder());
View Full Code Here

      assertEquals(4, deployer3.getUndeployOrder());
   }

   public void testTransitionOrdering() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer1 = new TestFlowDeployer("A");
      deployer1.setInputs("3");
      deployer1.setOutputs("4");
      addDeployer(main, deployer1);

      TestFlowDeployer deployer2 = new TestFlowDeployer("B");
      deployer2.setInputs("1");
      deployer2.setOutputs("2");
      addDeployer(main, deployer2);

      TestFlowDeployer deployer3 = new TestFlowDeployer("C");
      deployer3.setInputs("2");
      deployer3.setOutputs("3");
      addDeployer(main, deployer3);

      Deployment deployment = createSimpleDeployment("TransitionOrdering");
      main.addDeployment(deployment);
      main.process();

      assertEquals(3, deployer1.getDeployOrder());
      assertEquals(1, deployer2.getDeployOrder());
      assertEquals(2, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(3, deployer1.getDeployOrder());
      assertEquals(1, deployer2.getDeployOrder());
      assertEquals(2, deployer3.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
      assertEquals(6, deployer2.getUndeployOrder());
      assertEquals(5, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(9, deployer1.getDeployOrder());
      assertEquals(7, deployer2.getDeployOrder());
      assertEquals(8, deployer3.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
View Full Code Here

      assertEquals(5, deployer3.getUndeployOrder());
   }

   public void testSymetricDots() throws Exception
   {
      DeployerClient main = createMainDeployer();
      TestFlowDeployer deployer1 = new TestFlowDeployer("1");
      deployer1.setInputs("X");
      deployer1.setOutputs("B");
      addDeployer(main, deployer1);

      TestFlowDeployer deployer2 = new TestFlowDeployer("2");
      deployer2.setInputs("X");
      deployer2.setOutputs("X");
      addDeployer(main, deployer2);

      TestFlowDeployer deployer3 = new TestFlowDeployer("3");
      deployer3.setInputs("A");
      deployer3.setOutputs("X");
      addDeployer(main, deployer3);

      Deployment deployment = createSimpleDeployment("SymetricDots");
      main.addDeployment(deployment);
      main.process();

      assertEquals(3, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(1, deployer3.getDeployOrder());
      assertEquals(-1, deployer1.getUndeployOrder());
      assertEquals(-1, deployer2.getUndeployOrder());
      assertEquals(-1, deployer3.getUndeployOrder());

      main.removeDeployment(deployment);
      main.process();

      assertEquals(3, deployer1.getDeployOrder());
      assertEquals(2, deployer2.getDeployOrder());
      assertEquals(1, deployer3.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
      assertEquals(5, deployer2.getUndeployOrder());
      assertEquals(6, deployer3.getUndeployOrder());

      main.addDeployment(deployment);
      main.process();

      assertEquals(9, deployer1.getDeployOrder());
      assertEquals(8, deployer2.getDeployOrder());
      assertEquals(7, deployer3.getDeployOrder());
      assertEquals(4, deployer1.getUndeployOrder());
View Full Code Here

TOP

Related Classes of org.jboss.deployers.client.spi.DeployerClient

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.