Package org.hive2hive.core.api.interfaces

Examples of org.hive2hive.core.api.interfaces.IH2HNode.connect()


    // TODO the initial peer has an autostart, whereas the others dont

    // create initial peer
    IH2HNode initial = H2HNode.createNode(NetworkConfiguration.create("initial"), FileConfiguration.createDefault());
    initial.connect();
    initial.getFileManager().configureAutostart(false);
    initial.getUserManager().configureAutostart(false);

    nodes.add(initial);
View Full Code Here


    try {
      InetAddress bootstrapAddress = InetAddress.getLocalHost();
      for (int i = 1; i < numberOfNodes; i++) {
        IH2HNode node = H2HNode.createNode(NetworkConfiguration.create("node " + i, bootstrapAddress),
            FileConfiguration.createDefault());
        node.connect();
        node.getFileManager().configureAutostart(false);
        node.getUserManager().configureAutostart(false);
        nodes.add(node);
      }
    } catch (UnknownHostException e) {
View Full Code Here

    IH2HNode node = H2HNode.createNode(NetworkConfiguration.create(), FileConfiguration.createDefault());
   
    TestNetworkEventListener listener = new TestNetworkEventListener();
    node.addEventListener(listener);
   
    node.connect();
   
    assertTrue(listener.connectionSucceeded || listener.connectionFailed);
    assertTrue(!listener.disconnectionSucceeded && !listener.disconnectionFailed);
    listener.reset();
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.