public HTTPConnectionWrapper getConnectionWrapper(URI uri)
		throws ParseException,
		ProtocolNotSuppException,
		SSLContextFactoryException {

		final URI keyURI =
			new URI(uri.getScheme(), uri.getHost(), uri.getPort(), "");

		final HTTPConnectionWrapper existingConnectionWrapper = m_httpConnectionWrappers.get(keyURI);

		if (existingConnectionWrapper != null) {
			return existingConnectionWrapper;
		}

		final HTTPPluginConnectionDefaults connectionDefaults = HTTPPluginConnectionDefaults.getConnectionDefaults();

		final HTTPConnection httpConnection = new HTTPConnection(uri);
		httpConnection.setContext(this);

		if ("https".equals(uri.getScheme())) {
			httpConnection.setSSLSocketFactory(m_sslContextFactory.getSSLContext().getSocketFactory());
		}

		httpConnection.setTimeAuthority(m_timeAuthority);

		final HTTPConnectionWrapper newConnectionWrapper = new HTTPConnectionWrapper(
			httpConnection,
			connectionDefaults,
			m_slowClientSleeper);

		m_httpConnectionWrappers.put(keyURI, newConnectionWrapper);

		return newConnectionWrapper;
	}
HTTP plug-in thread state. (modified for nGrinder)

@author Philip Aston
ngrinder-runtime/src/main/java/net/grinder/plugin/http/HTTPPluginThreadState.java