public void run() {
		if (!mClient.connect()) {
			return;
		}

		Scanner scan = new Scanner(System.in);

		boolean running = true;
		while(running) {
			StringBuilder sb = new StringBuilder();
			sb.append(sUserActions[0]);
			for(int i=1; i<sUserActions.length; i++) {
				sb.append(", ");
				sb.append(sUserActions[i]);
			}
			System.out.printf("Please enter action [%s]: ",sb.toString());
			String input = scan.nextLine();

			switch (input) {
				case USER_ACTION_EXIT:
					running = false;
					break;
				case USER_ACTION_ADDCAB:
					addCabRequest(scan);
					break;
				case USER_ACTION_ADDPASSENGER:
					addPassengerRequest(scan);
					break;
				case USER_ACTION_LIST_DRIVING:
					sendListRequest(MessageFactory.ACTION_LIST_DRIVING);
					break;
				case USER_ACTION_LIST_WAITING_CABS:
					sendListRequest(MessageFactory.ACTION_LIST_WAITING_CABS);
					break;
				case USER_ACTION_LIST_PASSENGERS:
					sendListRequest(MessageFactory.ACTION_LIST_WAITING_PASSENGERS);
					break;
				default:
					System.out.println("Wrong input. Try again.");
					break;
			}
		}
		
		Request msg = new Request(MessageFactory.ACTION_EXIT);
		mClient.sendRequest(msg.toJSON());
		
		mClient.close();
	}