@Override
	public void run()
	{
		RUBTConstants.main_log.info("Starting RUBTClient UserInput Listener");
		System.out.println("Welcome to RUBTClient");
		System.out.println("Terminate program by typing quit");
		System.out.println("To get current status, type status.");
		while (this.keepRunning) {
			//sleep when reader empty
			try {
				if (!this.reader.ready()) {
					try {
						Thread.sleep(100);
					} catch (InterruptedException ie) {
						// Ignored
					}
					continue;
				}
				//read user input
				String line = this.reader.readLine().trim();
				if ("quit".equalsIgnoreCase(line)) {
					RUBTConstants.main_log.info("User requested quit");
					System.out.println("Shutting down...");
					for (RUBTClientListener listener : this.listeners) {
						listener.userRequestedShutdown();
					}
					break;
				}
				else if ("status".equalsIgnoreCase(line))
				{
					RUBTConstants.main_log.info("User requested status");
					for (RUBTClientListener listener : this.listeners) {
						listener.userRequestedStatus();
					}
				}
				else
				{
					System.out.println("No such command. Try again ...");
				}
			} catch (IOException e) {
				// leave for debug
				RUBTConstants.main_log.info("Reading user input failed because " + e.getMessage());
			}
		}
		RUBTConstants.main_log.info("RUBTClient is shutting down");
	}