public Service setFactory(Object factory, String createMethod) { m_delegate.setFactory(factory, createMethod); return this; }
public Service setFactory(String createMethod) { m_delegate.setFactory(createMethod); return this; }
Objects.nonNull(m_factory); if (m_hasFactoryRef) { m_component.setFactory(m_factory, "create"); if (m_factoryHasComposite) { m_component.setComposition(m_factory, "getComposite"); m_component.setFactory(m_factory, m_factoryCreateMethod);
.setFactory(m_instanceFactory, m_instanceFactoryCreateMethod) // if not set, no effect
.setInterface(m_serviceInterfaces, props) .setImplementation(m_serviceImpl) .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
.setInterface(m_serviceInterfaces, props) .setImplementation(m_serviceImpl) .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
.setInterface(m_serviceInterfaces, getServiceProperties(ref)) .setImplementation(m_serviceImpl) .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
/** * Method called from our superclass, when we need to create a service. */ @SuppressWarnings("unchecked") public Component createService(Object[] properties) throws Exception { Dictionary<String, ?> settings = (Dictionary<String, ?>) properties[0]; Component newService = m_manager.createComponent(); // Merge adapter service properties, with CM settings Dictionary<String, Object> serviceProperties = getServiceProperties(settings); newService.setInterface(m_serviceInterfaces, serviceProperties); newService.setImplementation(m_serviceImpl); newService.setFactory(m_factory, m_factoryCreateMethod); // if not set, no effect newService.setComposition(m_compositionInstance, m_compositionMethod); // if not set, no effect newService.setCallbacks(m_callbackObject, m_init, m_start, m_stop, m_destroy); // if not set, no effect newService.setScope(m_scope); configureAutoConfigState(newService, m_component); copyDependencies(m_component.getDependencies(), newService); for (int i = 0; i < m_stateListeners.size(); i ++) { newService.add(m_stateListeners.get(i)); } // Instantiate the component, because we need to invoke the updated callback synchronously, in the CM calling thread. ((ComponentContext) newService).instantiateComponent(); CallbackTypeDef callbackInfo = createCallbackType(m_logger, newService, m_configTypes, settings); invokeUpdated(newService, callbackInfo); return newService; }
c.setFactory(b.loadClass(impl), factoryMethod);
c.setFactory(adapterImplClass, factoryMethod);
c.setFactory(implClass, factoryMethod);
c.setFactory(adapterImplClass, factoryMethod);
.setInterface(serviceInterfaces, serviceProperties) .setImplementation(m_serviceImpl) .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
c.setFactory(implClass, factoryMethod);
c.setFactory(implClass, factoryMethod);