code: public int parseParameters(String[] args) {
  		
  		// check for action
  		if (args.length < 1) {
  			System.out.println("Please specify an action.");
  			printHelp();
  			return 1;
  		}
  		
  		// get action
  		String action = args[0];
  		
  		// remove action from parameters
  		String[] params = Arrays.copyOfRange(args, 1, args.length);
  		
  		// do action
  		if (action.equals(ACTION_RUN)) {
  			return run(params);
  		} else if (action.equals(ACTION_LIST)) {
  			return list(params);
  		} else if (action.equals(ACTION_INFO)) {
  			return info(params);
  		} else if (action.equals(ACTION_CANCEL)) {
  			return cancel(params);
  		} else if (action.equals("-h") || action.equals("--help")) {
  			printHelp();
  			return 0;
  		} else {
  			System.out.println("Invalid action!");
  			printHelp();
  			return 1;
  		}
  	}
docs: Parses the command line arguments and starts the requested action.
  
  @param args command line arguments of the client.
  @return The return code of the program