use of io.aklivity.zilla.runtime.engine.binding.BindingFactory in project zilla by aklivity.
the class EngineBuilder method build.
public Engine build() {
final EngineConfiguration config = new EngineConfiguration(this.config != null ? this.config : new Configuration());
final Set<Binding> bindings = new LinkedHashSet<>();
final BindingFactory bindingFactory = BindingFactory.instantiate();
for (String name : bindingFactory.names()) {
Binding binding = bindingFactory.create(name, config);
bindings.add(binding);
}
final Set<Vault> vaults = new LinkedHashSet<>();
final VaultFactory vaultFactory = VaultFactory.instantiate();
for (String name : vaultFactory.names()) {
Vault vault = vaultFactory.create(name, config);
vaults.add(vault);
}
final ErrorHandler errorHandler = requireNonNull(this.errorHandler, "errorHandler");
return new Engine(config, bindings, vaults, errorHandler, configURL, affinities);
}
Aggregations