Package network

Examples of network.Message


            if (args[0].equalsIgnoreCase("bye")) {
              appConsole.log("Thread:Main - Terminating session");
              loopFlag=false;
            } else if (args[0].equalsIgnoreCase("add")) {
 
              Message theMessage = new Message();
              theMessage.setCommand("add");
              theMessage.setFileId(args[1]);
              theMessage.setFileContents(new File(args[1]));
              theMessage.setSenderHostName(myAddress);
              ourPeers.transmitEventToPeers(theMessage, appConsole);
              System.out.println("Add Request Sent to other nodes");
            }
            else if (args[0].equalsIgnoreCase("get")) {
             
              Message theMessage = new Message();
              theMessage.setCommand("get");
              theMessage.setFileId(args[1]);
              theMessage.setSenderHostName(myAddress);
              ourPeers.transmitEventToPeers(theMessage, appConsole);
              System.out.println("Get Request Sent to other nodes");
            }
       
       
View Full Code Here

TOP

Related Classes of network.Message

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.