4 * Generated from: yang module name: opendaylight-sal-dom-broker-impl yang module local name: schema-service-singleton
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Nov 20 17:01:31 CET 2013
8 * Do not modify this file unless it is present under src/main directory
10 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
12 import java.util.Collections;
15 import org.opendaylight.controller.config.api.DependencyResolver;
16 import org.opendaylight.controller.config.api.DependencyResolverFactory;
17 import org.opendaylight.controller.config.api.ModuleIdentifier;
18 import org.opendaylight.controller.config.spi.Module;
19 import org.osgi.framework.BundleContext;
24 public class SchemaServiceImplSingletonModuleFactory extends
25 org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractSchemaServiceImplSingletonModuleFactory {
27 private static final ModuleIdentifier IDENTIFIER = new ModuleIdentifier(NAME, "yang-schema-service");
28 public static SchemaServiceImplSingletonModule SINGLETON;
31 public Module createModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
32 throw new UnsupportedOperationException("Only default instance supported.");
36 public Set<SchemaServiceImplSingletonModule> getDefaultModules(DependencyResolverFactory dependencyResolverFactory,
37 BundleContext bundleContext) {
38 DependencyResolver dependencyResolver = dependencyResolverFactory.createDependencyResolver(IDENTIFIER);
40 if (SINGLETON == null) {
41 SINGLETON = new SchemaServiceImplSingletonModule(IDENTIFIER, dependencyResolver);
42 SINGLETON.setBundleContext(bundleContext);
44 return Collections.singleton(SINGLETON);