public static RepositoryServerAdapter getRepositoryServer(String host, int port,
			boolean forceConnect) {

		// ensure that default callback is setup if possible
		getClientAuthenticator();

		if (port <= 0) {
			port = GhidraServerHandle.DEFAULT_PORT;
		}

		ServerInfo server = new ServerInfo(host, port);

		RepositoryServerAdapter rsa;
		synchronized (serverHandles) {
			rsa = serverHandles.get(server);
			if (rsa == null) {
				rsa = new RepositoryServerAdapter(server);
				serverHandles.put(server, rsa);
				forceConnect = true;
			}
			if (forceConnect) {
				try {
					rsa.connect();
				}
				catch (NotConnectedException e) {
					// message already displayed by RepositoryServerAdapter, so don't handle here
				}
			}
		}

		return rsa;
	}
Connect to a Repository Server and obtain a handle to it.
Based upon the server authentication requirements, the user may be
prompted for a password via a Swing dialog.
@param host server name or address
@param port server port, 0 indicates that default port should be used.
@param forceConnect if true and the server adapter is disconnected, an
attempt will be made to reconnect.
@return repository server handle
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ClientUtil.java