private static void displayMenu(){
		boolean terminateLoop = false;
		Long initClock=System.currentTimeMillis();
		Long exitClock=initClock+Constants.AMNODEALIVEDURATION;
		if(Constants.AUTOMATICMODE){
			while(System.currentTimeMillis()<exitClock){
				MultiCastMessage results = readMessage(Constants.MESSAGESFILE);
				if(results!=null)
					sendMulticastMessage(results);
				try {
					Thread.sleep(Constants.DELAY);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			applicationRunning=false;
			return;
		}else{
			while (!terminateLoop) {
				System.out.println("1.Send a message");
				System.out.println("2.Test the service");
				System.out.println("3.Terminate and exit");

				Scanner in = new Scanner(System.in);
				int a = in.nextInt();
				//in.close();
				switch (a) {
				case 1:
					MultiCastMessage results = readMessage(Constants.MESSAGESFILE);
					if(results!=null)
						sendMulticastMessage(results);
					break;
				case 2:
					break;
				case 3:
					System.out.println("Exiting");
					
					applicationRunning=false;
					terminateLoop = true;
					break;
				default:
					break;
				}
			}
		}
		return;
	}