/** * Adds a Supplier for a wire or producer proxy. * * @param name the reference or producer name * @param type the interface type implemented by the proxy * @param supplier the Supplier */ public void attach(String name, Class<?> type, Supplier supplier) { parent.add(name, type, supplier); }
/** * Adds an object factory for a wire or producer proxy. * * @param name the reference or producer name * @param type the interface type implemented by the proxy * @param factory the object factory */ public void attach(String name, Class<?> type, ObjectFactory factory) { parent.add(name, type, factory); }
/** * Adds a Supplier for a wire or producer proxy. * * @param name the reference or producer name * @param type the interface type implemented by the proxy * @param supplier the Supplier */ public void attach(String name, Class<?> type, Supplier supplier) { parent.add(name, type, supplier); }
/** * Creates a parent application context populated with system components configured to be aliased as Spring beans. * * @param classLoader the context classloader * @param properties any defined property values keyed by name * @return the parent application context */ private SCAApplicationContext createParentContext(ClassLoader classLoader, Map<String, Pair> properties) { ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(classLoader); SCAApplicationContext parent = new SCAApplicationContext(); for (Map.Entry<String, Pair> entry : properties.entrySet()) { String name = entry.getKey(); Pair pair = entry.getValue(); parent.add(name, pair.getType(), pair.getFactory()); } for (ApplicationContextListener listener : listeners) { listener.onCreate(parent); } return parent; } finally { Thread.currentThread().setContextClassLoader(old); } }
/** * Creates a parent application context populated with system components configured to be aliased as Spring beans. * * @param classLoader the context classloader * @param properties any defined property values keyed by name * @return the parent application context */ private SCAApplicationContext createParentContext(ClassLoader classLoader, Map<String, Pair> properties) { ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(classLoader); SCAApplicationContext parent = new SCAApplicationContext(); for (Map.Entry<String, Pair> entry : properties.entrySet()) { String name = entry.getKey(); Pair pair = entry.getValue(); parent.add(name, pair.getType(), pair.getSupplier()); } for (ApplicationContextListener listener : listeners) { listener.onCreate(parent); } return parent; } finally { Thread.currentThread().setContextClassLoader(old); } }
/** * Creates a parent application context populated with system components configured to be aliased as Spring beans. * * @param classLoader the context classloader * @param properties any defined property values keyed by name * @return the parent application context */ private SCAApplicationContext createParentContext(ClassLoader classLoader, Map<String, Pair> properties) { ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(classLoader); SCAApplicationContext parent = new SCAApplicationContext(); for (Map.Entry<String, Pair> entry : properties.entrySet()) { String name = entry.getKey(); Pair pair = entry.getValue(); parent.add(name, pair.getType(), pair.getSupplier()); } for (ApplicationContextListener listener : listeners) { listener.onCreate(parent); } return parent; } finally { Thread.currentThread().setContextClassLoader(old); } }