{
List<ConnectorServiceConfiguration> configurationList = configuration.getConnectorServiceConfigurations();
for (ConnectorServiceConfiguration info : configurationList)
{
ConnectorServiceFactory factory = (ConnectorServiceFactory) ClassloadingUtil.safeInitNewInstance(info.getFactoryClassName());
if (info.getParams() != null)
{
Set<String> invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), info.getParams()
.keySet());
if (!invalid.isEmpty())
{
log.warn(ConfigurationHelper.stringSetToCommaListString("The following keys are invalid for configuring the connector service: ",
invalid) + " the connector will not be started.");
continue;
}
}
Set<String> invalid = ConfigurationHelper.checkKeysExist(factory.getRequiredProperties(), info.getParams()
.keySet());
if (!invalid.isEmpty())
{
log.warn(ConfigurationHelper.stringSetToCommaListString("The following keys are required for configuring the connector service: ",
invalid) + " the connector will not be started.");
continue;
}
ConnectorService connectorService = factory.createConnectorService(info.getConnectorName(), info.getParams(), storageManager, postOffice, scheduledPool);
connectors.add(connectorService);
}
for (ConnectorService connector : connectors)
{