Package io.vertx.core

Examples of io.vertx.core.Verticle


    await();
  }

  @Test
  public void testSimpleChildDeployment() throws Exception {
    Verticle verticle = new MyAsyncVerticle(f -> {
      Context parentContext = vertx.context();
      Verticle child1 = new MyAsyncVerticle(f2 -> {
        Context childContext = vertx.context();
        assertNotSame(parentContext, childContext);
        f2.complete(null);
        testComplete();
      }, f2 -> f2.complete(null));
View Full Code Here


    AtomicBoolean childStopCalled = new AtomicBoolean();
    AtomicBoolean parentStopCalled = new AtomicBoolean();
    AtomicReference<String> parentDepID = new AtomicReference<>();
    AtomicReference<String> childDepID = new AtomicReference<>();
    CountDownLatch deployLatch = new CountDownLatch(1);
    Verticle verticle = new MyAsyncVerticle(f -> {
      Verticle child1 = new MyAsyncVerticle(f2 -> f2.complete(null), f2 -> {
        // Child stop is called
        assertFalse(parentStopCalled.get());
        assertFalse(childStopCalled.get());
        childStopCalled.set(true);
        f2.complete(null);
View Full Code Here

    List<String> extraClasspath = Arrays.asList(cp1, cp2);
    vertx.deployVerticle("java:" + TestVerticle.class.getCanonicalName(), new DeploymentOptions().setIsolationGroup("somegroup").
      setExtraClasspath(extraClasspath), ar -> {
      assertTrue(ar.succeeded());
      Deployment deployment = ((VertxInternal) vertx).getDeployment(ar.result());
      Verticle verticle = deployment.getVerticles().iterator().next();
      ClassLoader cl = verticle.getClass().getClassLoader();
      URLClassLoader urlc = (URLClassLoader) cl;
      assertTrue(urlc.getURLs()[0].toString().endsWith(cp1));
      assertTrue(urlc.getURLs()[1].toString().endsWith(cp2));
      testComplete();
    });
View Full Code Here

TOP

Related Classes of io.vertx.core.Verticle

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.