{
// TODO: add printout of found protocols
throw new IllegalStateException("Defined default protocol " + defaultProtcolDef.getType() + " can not be found on classpath");
}
}
ProtocolRegistry registry = new ProtocolRegistry();
for(Protocol<?> protocol : protocols)
{
injector.get().inject(protocol); // TODO: should be moved to ServiceRegistry, during Service creation
if(defaultProtocol != null && protocol.equals(defaultProtocol))
{
registry.addProtocol(new ProtocolDefinition(protocol, defaultProtcolDef.getProperties(), true));
}
else
{
registry.addProtocol(new ProtocolDefinition(protocol));
}
}
registryInstance.set(registry);
}