@Override
	public void connect() throws IOException {

		// TODO: Use protocol extension handler if specified

		if (connected) {
			return;
		}

		if (protocolConnector instanceof DefaultLocalGhidraProtocolConnector) {
			// local project connection
			DefaultLocalGhidraProtocolConnector localConnector =
				(DefaultLocalGhidraProtocolConnector) protocolConnector;
			projectData = localConnector.getLocalProjectData(readOnly);
			statusCode = localConnector.getStatusCode();
			connected = true;
			if (statusCode == StatusCode.OK) {
				refObject = new GhidraURLWrappedContent(this);
			}
			return;
		}

		String repoName = protocolConnector.getRepositoryName();
		if (repoName == null) {
			// assume only server adapter connection without repository name specified
			// any RepositoryServerAdapter caching is responsibility of connector
			statusCode = protocolConnector.connect(readOnly);
			connected = true;
			if (statusCode == StatusCode.OK) {
				refObject = protocolConnector.getRepositoryServerAdapter();
				if (refObject == null) {
					throw new AssertException("expected RepositoryServerAdapter content");
				}
			}
			return;
		}

		// Assume repository URL which will supply RepositoryAdapter content
		// If an existing transient project can be found it will be re-used and the 
		// connector notified via the connect(RepositoryAdapter), otherwise the 
		// connect(boolean readOnly) method will be invoked and a new transient project
		// will be established with a RepositoryAdapter supplied by the connector.

		// Obtain connected transient project for repository and complete connection
		TransientProjectManager transientProjectManager =
			TransientProjectManager.getTransientProjectManager();
		TransientProjectData transientProjectData =
			transientProjectManager.getTransientProject(protocolConnector, readOnly);

		connected = true;
		statusCode = protocolConnector.getStatusCode();

		if (statusCode != StatusCode.OK) {
			return;
		}

		projectData = transientProjectData;
		refObject = new GhidraURLWrappedContent(this);
	}
If URL connects and corresponds to a valid repository or local project, this method
may be used to obtain the associated ProjectData object.  The caller is
responsible for properly {@link ProjectData#close() closing} the returned project data 
instance when no longer in-use, failure to do so may prevent release of repository handle 
to server until process exits.  It is important that {@link ProjectData#close()} is
invoked once, and only once, per call to this method to ensure project "use" tracking 
is properly maintained.  Improperly invoking the close method on a shared transient 
{@link ProjectData} instance may cause the underlying storage to be prematurely
disposed. 

@return project data which corresponds to this connection or null if unavailable
@throws IOException if an IO error occurs
Ghidra/Framework/Project/src/main/java/ghidra/framework/protocol/ghidra/GhidraURLConnection.java