Package net.kuujo.vertigo

Examples of net.kuujo.vertigo.Vertigo


  @Test
  public void testInstallAndDeploy() {
    // Deploy a cluster. This cluster will be deployed with the vertx.mods
    // property set to server-mods where it will install uploaded modules.
    Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("test", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        // In order to trick the cluster client into thinking our modules are
        // in the test-mods directory (where they actually are) we have to set
View Full Code Here


    }
  }

  @Test
  public void testGroupOrder() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestOrderedGroupSender.class.getName());
        network.addVerticle("receiver", TestOrderedGroupReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testNestedGroupsOrder() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestOrderedNestedGroupSender.class.getName());
        network.addVerticle("receiver", TestOrderedNestedGroupReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testGroupForward() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestGroupForwardSender.class.getName());
        network.addVerticle("forwarder", TestGroupForwardForwarder.class.getName());
        network.addVerticle("receiver", TestGroupForwardReceiver.class.getName());
        network.createConnection("sender", "out", "forwarder", "in").roundSelect();
        network.createConnection("forwarder", "out", "receiver", "in").roundSelect();
View Full Code Here

    }
  }

  @Test
  public void testOneToNone() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestSender.class.getName());
        network.addVerticle("receiver", TestReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testOneToOne() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestSender.class.getName());
        network.addVerticle("receiver", TestReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testOneToMany() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestOneToManySender.class.getName());
        network.addVerticle("receiver", TestOneToManyReceiver.class.getName(), 4);
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testManyToOne() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestManyToOneSender.class.getName(), 4);
        network.addVerticle("receiver", TestManyToOneReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testManyToMany() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestManyToManySender.class.getName(), 4);
        network.addVerticle("receiver", TestManyToManyReceiver.class.getName(), 4);
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testCircular() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestCircularSender.class.getName());
        network.addVerticle("receiver", TestCircularReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        network.createConnection("receiver", "out", "sender", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.Vertigo

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.