Exemplo n.º 1
0
 private ZoneFactory getZoneFactory(ZoneType type) {
   ZoneFactory factory = zoneFactories.get(type.toString());
   if (factory == null) {
     throw new CloudRuntimeException(String.format("No ZoneFactory of type[%s] found", type));
   }
   return factory;
 }
Exemplo n.º 2
0
 private void populateExtensions() {
   for (ZoneFactory f : pluginRgty.getExtensionList(ZoneFactory.class)) {
     ZoneFactory old = zoneFactories.get(f.getType().toString());
     if (old != null) {
       throw new CloudRuntimeException(
           String.format(
               "duplicate ZoneFactory[%s, %s] for type[%s]",
               f.getClass().getName(), old.getClass().getName(), f.getType()));
     }
     zoneFactories.put(f.getType().toString(), f);
   }
 }