use of org.apache.activemq.artemis.core.server.ConnectorServiceFactory in project activemq-artemis by apache.
the class ActiveMQServerControlImpl method createConnectorService.
@Override
public void createConnectorService(final String name, final String factoryClass, final Map<String, Object> parameters) throws Exception {
checkStarted();
clearIO();
try {
final ConnectorServiceConfiguration config = new ConnectorServiceConfiguration().setName(name).setFactoryClassName(factoryClass).setParams(parameters);
ConnectorServiceFactory factory = server.getServiceRegistry().getConnectorService(config);
server.getConnectorsService().createService(config, factory);
} finally {
blockOnIO();
}
}
use of org.apache.activemq.artemis.core.server.ConnectorServiceFactory in project activemq-artemis by apache.
the class ServiceRegistryImpl method getConnectorServices.
@Override
public Collection<Pair<ConnectorServiceFactory, ConnectorServiceConfiguration>> getConnectorServices(List<ConnectorServiceConfiguration> configs) {
if (configs != null) {
for (final ConnectorServiceConfiguration config : configs) {
if (connectorServices.get(config.getConnectorName()) == null) {
ConnectorServiceFactory factory = loadClass(config.getFactoryClassName());
addConnectorService(factory, config);
}
}
}
return connectorServices.values();
}
Aggregations