Package net.kuujo.vertigo.network

Examples of net.kuujo.vertigo.network.NetworkConfig


        listener.start(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            assertTrue(result.succeeded());

            NetworkConfig network = vertigo.createNetwork();
            network.addComponent("sender", TestSimpleSender.class.getName()).addHook(new EventBusHook("test-hook"));
            network.addComponent("receiver", TestSimpleReceiver.class.getName());
            network.createConnection("sender", "out", "receiver", "in");

            cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
              @Override
              public void handle(AsyncResult<ActiveNetwork> result) {
                if (result.failed()) {
View Full Code Here


        listener.start(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            assertTrue(result.succeeded());

            NetworkConfig network = vertigo.createNetwork();
            network.addComponent("sender", TestSimpleSender.class.getName());
            network.addComponent("receiver", TestSimpleReceiver.class.getName()).addHook(new EventBusHook("test-hook"));
            network.createConnection("sender", "out", "receiver", "in");

            cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
              @Override
              public void handle(AsyncResult<ActiveNetwork> result) {
                if (result.failed()) {
View Full Code Here

    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("test-deploy");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker1", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream1", "worker", "stream1");
        network.createConnection("feeder", "stream2", "worker", "stream2");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    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("test-undeploy-by-name");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker1", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream1", "worker", "stream1");
        network.addVerticle("worker2", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream2", "worker", "stream2");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final NetworkConfig network = vertigo.createNetwork("test-undeploy-by-config");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker1", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream1", "worker", "stream1");
        network.addVerticle("worker2", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream2", "worker", "stream2");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    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("test-get-network-1");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream", "worker", "stream");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
            assertTrue(result.succeeded());
            NetworkConfig network = vertigo.createNetwork("test-get-network-2");
            network.addVerticle("feeder", TestFeeder.class.getName());
            network.addVerticle("worker", TestWorker.class.getName(), 2);
            network.createConnection("feeder", "stream", "worker", "stream");
            cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
              @Override
              public void handle(AsyncResult<ActiveNetwork> result) {
                assertTrue(result.succeeded());
                cluster.getNetwork("test-get-network-1", new Handler<AsyncResult<ActiveNetwork>>() {
View Full Code Here

    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("test-get-networks-1");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream", "worker", "stream");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
            assertTrue(result.succeeded());
            NetworkConfig network = vertigo.createNetwork("test-get-networks-2");
            network.addVerticle("feeder", TestFeeder.class.getName());
            network.addVerticle("worker", TestWorker.class.getName(), 2);
            network.createConnection("feeder", "stream", "worker", "stream");
            cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
              @Override
              public void handle(AsyncResult<ActiveNetwork> result) {
                assertTrue(result.succeeded());
                cluster.getNetworks(new Handler<AsyncResult<Collection<ActiveNetwork>>>() {
View Full Code Here

    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("test-circular-deploy");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker", TestWorker.class.getName());
        network.createConnection("feeder", "out", "worker", "in");
        network.createConnection("worker", "out", "feeder", "in");

        Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    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("test-broken-deploy");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker", TestWorker.class.getName(), 2);
        network.createConnection("feeder", "stream", "worker", "stream");
        network.createConnection("worker", "out", "nowhere", "in");

        Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    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("test-deploy-merge");
        network.addVerticle("feeder", TestFeeder.class.getName());
        network.addVerticle("worker", TestWorker.class.getName());
        network.createConnection("feeder", "out", "worker", "in");

        final Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
            assertTrue(result.succeeded());
            NetworkConfig network = vertigo.createNetwork("test-deploy-merge");
            network.addVerticle("feeder2", TestFeeder.class.getName());
            network.addVerticle("worker2", TestWorker.class.getName());
            network.createConnection("feeder2", "out", "worker2", "in");

            cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
              @Override
              public void handle(AsyncResult<ActiveNetwork> result) {
                assertTrue(result.succeeded());
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.network.NetworkConfig

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.