@Override public Collection<ServiceController<?>> install( ServiceTarget target, String group, ModuleIdentifier moduleId) { ServiceName name = CacheServiceNames.NODE_FACTORY.getServiceName(group); ServiceBuilder<? extends NodeFactory<?>> builder = CacheNodeFactoryService.build(target, name, group, CacheContainer.DEFAULT_CACHE_ALIAS); ServiceController<? extends NodeFactory<?>> controller = builder.setInitialMode(ServiceController.Mode.ON_DEMAND).install(); return Collections.<ServiceController<?>>singleton(controller); }
@Override public Collection<ServiceName> getServiceNames(String group) { return Collections.singleton(CacheServiceNames.NODE_FACTORY.getServiceName(group)); }