public static void main(String[] args) {
		int registryPort = Integer.parseInt(args[0]); // get the port of the
														// registry
		Registry registry = new Registry(registryPort);

		Scanner input = new Scanner(System.in);
		String command;
		do {
			System.out.println("Enter a command at any time: ");
			command = input.nextLine();

			String delims = " ";
			String[] tokens = command.split(delims);
			String option = tokens[0];

			if (option.equals("setup-overlay")) {
				System.out.println("Setting up overlay...");
				registry.setupOverlay(4);
			} else if (option.equals("send-overlay-link-weights")) {
				System.out.println("Sending overlay link weights to nodes...");
				registry.sendOverlayLinkWeights();
			} else if (option.equals("list-weights")) {
				System.out.println("Weights:");
				System.out.println(registry.listWeights());
			} else if (option.equals("list-messaging-nodes")) {
				registry.listMessagingNodes();
				System.out.println();
			} else if (option.equals("start")) {
				System.out.println("Starting node tasks...");
				registry.startTasks();
			} else if (option.equals("print-stats")) {
				registry.printStats();
				System.out.println();
			} else {
				System.out.println("Invalid command. Try one of these:");
				System.out.println("    list-messaging-nodes");
				System.out.println("    list-weights");
				System.out.println("    setup-overlay <number-of-connections>");
				System.out.println("    send-overlay-link-weights");
				System.out.println("    start");

			}

		} while (true);
	}