SwitchYardCamelContextImpl camelContext = new SwitchYardCamelContextImpl();
CamelExchangeBus bus = new CamelExchangeBus(camelContext);
ServiceDomainSecurity serviceDomainSecurity = getServiceDomainSecurity(switchyardConfig);
DomainImpl domain = new DomainImpl(
domainName, _registry, bus, transformerRegistry, validatorRegistry, _eventManager, serviceDomainSecurity);
camelContext.setServiceDomain(domain);
// set properties on the domain
Map<String, String> properties = getDomainProperties(switchyardConfig);
for (Map.Entry<String, String> property : properties.entrySet()) {
domain.setProperty(property.getKey(), property.getValue());
}
// now that all resources and properties are set, init the domain
domain.init();
return domain;
}