private URI getDefaultUri() throws URISyntaxException {

		int port = Target.DEFAULT_PORT;
		String host = Target.DEFAULT_HOST;

		if (commandLine.getArgs() != null) {
			String[] args = commandLine.getArgs();
			int i = 0;
			while (i < args.length) {
				String arg = args[i++];
				if (arg.equals("--host")) {
					host = args[i++];
				}
				else if (arg.equals("--port")) {
					port = Integer.valueOf(args[i++]);
				}
				else {
					i--;
					break;
				}
			}
		}
		return new URI(Target.DEFAULT_SCHEME, null, host, port, null, null, null);
	}
Initialize the default {@link Target} for the XD Admin Server. It will use
the constants {@link Target#DEFAULT_HOST}, {@link Target#DEFAULT_PORT}
and {@link Target#DEFAULT_SCHEME}.

Alternatively, the host and port can also be set using the {@code --host}
and {@code --port} command line parameters.
spring-xd-shell/src/main/java/org/springframework/xd/shell/command/ConfigCommands.java