clRegex = PluginContainerConfiguration.getDefaultClassLoaderFilter();
}
// now that we have all the individual preferences, let's squirrel them away in a config object
PluginContainerConfiguration config = new PluginContainerConfiguration();
config.setInsideAgent(true);
config.setPluginDirectory(plugin_dir);
config.setDataDirectory(data_directory);
config.setTemporaryDirectory(tmp_directory);
config.setDisabledPlugins(disabled_plugins);
config.setEnabledPlugins(enabled_plugins);
config.setDisabledResourceTypes(disabled_types);
config.setRootPluginClassLoaderRegex(clRegex);
config.setServerDiscoveryInitialDelay(server_discovery_initial_delay);
config.setServerDiscoveryPeriod(server_discovery_period);
config.setServiceDiscoveryInitialDelay(service_discovery_initial_delay);
config.setServiceDiscoveryPeriod(service_discovery_period);
config.setChildResourceDiscoveryDelay(childResourceDiscoveryDelay);
config.setAvailabilityScanInitialDelay(avail_scan_initial_delay);
config.setAvailabilityScanPeriod(avail_scan_period);
config.setAvailabilityScanThreadPoolSize(avail_scan_threadpool_size);
config.setMeasurementCollectionThreadPoolSize(meas_threadpool_size);
config.setMeasurementCollectionInitialDelay(meas_scan_initial_delay);
config.setDriftDetectionInitialDelay(drift_initial_delay);
config.setDriftDetectionPeriod(drift_period);
config.setOperationInvokerThreadPoolSize(op_threadpool_size);
config.setOperationInvocationTimeout(op_timeout);
config.setContentDiscoveryThreadPoolSize(con_threadpool_size);
config.setContentDiscoveryInitialDelay(con_initial_delay);
config.setContentDiscoveryPeriod(con_period);
config.setConfigurationDiscoveryInitialDelay(config_discovery_initial_delay);
config.setConfigurationDiscoveryInterval(config_discovery_interval);
config.setConfigurationDiscoveryPeriod(config_discovery_period);
config.setConfigurationDiscoveryLimit(config_discovery_limit);
config.setEventSenderInitialDelay(event_sender_initial_delay);
config.setEventSenderPeriod(event_sender_period);
config.setEventReportMaxPerSource(event_report_max_per_src);
config.setEventReportMaxTotal(event_report_max_total);
if (name != null) {
config.setContainerName(name);
}
return config;
}