public void connect(String name, ChannelConnection connection) throws Fabric3Exception { Map<String, InjectionSite> sites = siteMappings.get(name); if (sites == null || sites.isEmpty()) { throw new Fabric3Exception("Injection site not found for: " + name); } Class<?> type = sites.values().iterator().next().getType(); Supplier<?> factory = createChannelFactory(type, connection); attach(name, factory); }
public void attachWire(String name, Wire wire) throws Fabric3Exception { Map<String, InjectionSite> sites = siteMappings.get(name); if (sites == null || sites.isEmpty()) { throw new Fabric3Exception("Injection site not found for: " + name); } Class<?> type = sites.values().iterator().next().getType(); Supplier<?> supplier = createWireFactory(type, wire); attach(name, supplier); }
if (supplier == null && (type == InjectableType.REFERENCE || type == InjectableType.CALLBACK)) { supplier = createSupplier(site.getType()); factories.put(attribute, supplier);
if (supplier == null && (type == InjectableType.REFERENCE || type == InjectableType.CALLBACK)) { supplier = createSupplier(site.getType()); factories.put(attribute, supplier);