Package communication

Examples of communication.NetworkManager


    }
  }

  public static void main (String [] args) {
    int peerIndex = Integer.parseInt(args[0]);
    NetworkManager nManag = null;

    /* Read peer configuration file */
    readConfiguration();

    /* Start the network communicator */
    if (Main.algorithm.equals(CBCAST_ALGO))
      nManag = new CBCASTNetworkManager(peerIndex);
    if (Main.algorithm.equals(TOTAL_ORDER_ALGO))
      nManag = new CentralizedNetworkManager(peerIndex);
    if (Main.algorithm.equals(THREE_PHASE_ALGO))
      nManag = new ThreePhaseNetworkManager(peerIndex);
    if (Main.algorithm.equals(ABCAST_ALGO))
      nManag = new ABCASTNetworkManager(peerIndex);
    if (Main.algorithm.equals(DOPT_ALGO))
      nManag = new DOPTNetworkManager(peerIndex);
    if (Main.algorithm.equals(JUPITER_ALGO))
      nManag = new JupiterNetworkManager(peerIndex);

    /* Start and show the gui */
    GUIManager gui = new GUIManager(nManag, peerIndex);
    nManag.connectToGUI(gui);
    nManag.start();

    gui.showGUI();


    /* Check if the test driver needs to run */
 
View Full Code Here

TOP

Related Classes of communication.NetworkManager

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.