Package net.kuujo.vertigo.network

Examples of net.kuujo.vertigo.network.ActiveNetwork


            if (result.failed()) {
              assertTrue(result.cause().getMessage(), result.succeeded());
            } else {
              // Add a "receiver" verticle to the network. The "receiver" verticle should
              // automatically be connected to the existing connection once it's deployed.
              ActiveNetwork network = result.result();
              network.addVerticle("receiver", TestActiveReceiver.class.getName(), new Handler<AsyncResult<ActiveNetwork>>() {
                @Override
                public void handle(AsyncResult<ActiveNetwork> result) {
                  if (result.failed()) {
                    assertTrue(result.cause().getMessage(), result.succeeded());
                  } else {
View Full Code Here


          public void handle(AsyncResult<ActiveNetwork> result) {
            if (result.failed()) {
              assertTrue(result.cause().getMessage(), result.succeeded());
            } else {
              // Remote a verticle from the network through the ActiveNetwork.
              ActiveNetwork network = result.result();
              network.removeVerticle("receiver", new Handler<AsyncResult<ActiveNetwork>>() {
                @Override
                public void handle(AsyncResult<ActiveNetwork> result) {
                  if (result.failed()) {
                    assertTrue(result.cause().getMessage(), result.succeeded());
                  } else {
View Full Code Here

            } else {
              // Now create a connection on the network. Both the "sender" and the
              // "receiver" component will be automatically updated with the new
              // connection, and messages send to the "sender"s "out" port will
              // be sent to the "receiver"s "in" port.
              ActiveNetwork network = result.result();
              network.createConnection("sender", "out", "receiver", "in", new Handler<AsyncResult<ActiveNetwork>>() {
                @Override
                public void handle(AsyncResult<ActiveNetwork> result) {
                  if (result.failed()) {
                    assertTrue(result.cause().getMessage(), result.succeeded());
                  } else {
View Full Code Here

            } else {
              // Destroy the connection between the "sender" and "receiver". Once
              // the connection is destroyed the sender will no longer be able to
              // send messages to the receiver and messages sent on its "out" port
              // will simply be discarded.
              ActiveNetwork network = result.result();
              network.destroyConnection("sender", "out", "receiver", "in", new Handler<AsyncResult<ActiveNetwork>>() {
                @Override
                public void handle(AsyncResult<ActiveNetwork> result) {
                  if (result.failed()) {
                    assertTrue(result.cause().getMessage(), result.succeeded());
                  } else {
View Full Code Here

TOP

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

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.