Package net.kuujo.vertigo.component.impl

Examples of net.kuujo.vertigo.component.impl.DefaultVerticleConfig


    assertEquals("test", network.getName());
  }

  @Test
  public void testVerticleDefaults() {
    VerticleConfig verticle = new DefaultVerticleConfig("test", "test.py", new DefaultNetworkConfig("test"));
    assertEquals("test", verticle.getName());
    assertTrue(verticle.getType().equals(ComponentConfig.Type.VERTICLE));
    assertEquals("test.py", verticle.getMain());
    assertEquals(new JsonObject(), verticle.getConfig());
    assertEquals(1, verticle.getInstances());
    assertFalse(verticle.isWorker());
    assertFalse(verticle.isMultiThreaded());
  }
View Full Code Here


    assertFalse(verticle.isMultiThreaded());
  }

  @Test
  public void testDefaultVerticleConfig() {
    VerticleConfig verticle = new DefaultVerticleConfig("test", "test.py", new DefaultNetworkConfig("test"));
    assertEquals("test", verticle.getName());
    assertTrue(verticle.getType().equals(ComponentConfig.Type.VERTICLE));
    assertEquals("test.py", verticle.getMain());
    verticle.setMain("foo.js");
    assertEquals("foo.js", verticle.getMain());
    assertEquals(new JsonObject(), verticle.getConfig());
    verticle.setConfig(new JsonObject().putString("foo", "bar"));
    assertEquals("bar", verticle.getConfig().getString("foo"));
    assertEquals(1, verticle.getInstances());
    verticle.setInstances(4);
    assertEquals(4, verticle.getInstances());
    verticle.setGroup("test");
    assertEquals("test", verticle.getGroup());
    assertFalse(verticle.isWorker());
    verticle.setWorker(true);
    assertTrue(verticle.isWorker());
    assertFalse(verticle.isMultiThreaded());
    verticle.setMultiThreaded(true);
    assertTrue(verticle.isMultiThreaded());
    verticle.setWorker(false);
    assertFalse(verticle.isMultiThreaded());
  }
View Full Code Here

    return addVerticle(name, main, null, instances);
  }

  @Override
  public VerticleConfig addVerticle(String name, String main, JsonObject config, int instances) {
    return addVerticle(new DefaultVerticleConfig(name, main, this).setConfig(config).setInstances(instances));
  }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.component.impl.DefaultVerticleConfig

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.