public void initialize(PluginProcessContext processContext)
		throws PluginException {

		m_pluginProcessContext = processContext;

		final Grinder.ScriptContext scriptContext = processContext.getScriptContext();

		m_sslContextFactory = scriptContext.getSSLControl();

		m_slowClientSleeper = new SleeperImplementation(
			m_pluginProcessContext.getTimeAuthority(), null, 1, 0);

		// Remove standard HTTPClient modules which we don't want. We load
		// HTTPClient modules dynamically as we don't have public access.
		try {
			// Don't want to retry requests.
			HTTPConnection.removeDefaultModule(Class.forName("HTTPClient.RetryModule"));
		} catch (ClassNotFoundException e) {
			throw new PluginException("Could not load HTTPClient modules", e);
		}

		// Turn off cookie permission checks.
		CookieModule.setCookiePolicyHandler(null);

		// Turn off authorisation UI.
		DefaultAuthHandler.setAuthorizationPrompter(null);

		// Register custom statistics.
		try {

			final Statistics statistics = scriptContext.getStatistics();

			statistics.registerDataLogExpression(
				"HTTP response code",
				StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_STATUS_KEY);

			statistics.registerDataLogExpression(
				"HTTP response length",
				StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_LENGTH_KEY);

			statistics.registerDataLogExpression(
				"HTTP response errors",
				StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_ERRORS_KEY);

			statistics.registerDataLogExpression(
				"Time to resolve host",
				StatisticsIndexMap.HTTP_PLUGIN_DNS_TIME_KEY);

			statistics.registerDataLogExpression(
				"Time to establish connection",
				StatisticsIndexMap.HTTP_PLUGIN_CONNECT_TIME_KEY);

			statistics.registerDataLogExpression(
				"Time to first byte",
				StatisticsIndexMap.HTTP_PLUGIN_FIRST_BYTE_TIME_KEY);

			statistics.registerSummaryExpression(
				"Mean response length",
				"(/ " + StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_LENGTH_KEY + " (+ (count timedTests) untimedTests))");

			statistics.registerSummaryExpression(
				"Response bytes per second",
				"(* 1000 (/ " + StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_LENGTH_KEY + " period))");

			statistics.registerSummaryExpression(
				"Response errors",
				StatisticsIndexMap.HTTP_PLUGIN_RESPONSE_ERRORS_KEY);

			statistics.registerSummaryExpression(
				"Mean time to resolve host",
				"(/ " + StatisticsIndexMap.HTTP_PLUGIN_DNS_TIME_KEY + " (+ (count timedTests) untimedTests))");

			statistics.registerSummaryExpression(
				"Mean time to establish connection",
				"(/ " + StatisticsIndexMap.HTTP_PLUGIN_CONNECT_TIME_KEY + " (+ (count timedTests) untimedTests))");

			statistics.registerSummaryExpression(
				"Mean time to first byte",
				"(/ " + StatisticsIndexMap.HTTP_PLUGIN_FIRST_BYTE_TIME_KEY + " (+ (count timedTests) untimedTests))");
		} catch (GrinderException e) {
			throw new PluginException("Could not register custom statistics", e);
		}
	}
Called by the PluginRegistry when the plug-in is first registered.

@param processContext The plug-in process context.
@throws PluginException if an error occurs.
ngrinder-runtime/src/main/java/net/grinder/plugin/http/HTTPPlugin.java