4 * Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: runtime-generated-mapping
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Nov 20 18:20:19 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.binding.impl;
12 import javassist.ClassPool;
14 import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
15 import org.opendaylight.controller.sal.binding.dom.serializer.impl.RuntimeGeneratedMappingServiceImpl;
16 import org.osgi.framework.BundleContext;
18 import com.google.common.base.Preconditions;
23 public final class RuntimeMappingModule extends
24 org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRuntimeMappingModule {
26 private BundleContext bundleContext;
28 public RuntimeMappingModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
29 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
30 super(identifier, dependencyResolver);
33 public RuntimeMappingModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
34 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
35 RuntimeMappingModule oldModule, java.lang.AutoCloseable oldInstance) {
36 super(identifier, dependencyResolver, oldModule, oldInstance);
40 public void validate() {
42 Preconditions.checkNotNull(bundleContext);
43 // Add custom validation for module attributes here.
47 public boolean canReuseInstance(AbstractRuntimeMappingModule oldModule) {
52 public java.lang.AutoCloseable createInstance() {
53 RuntimeGeneratedMappingServiceImpl service = new RuntimeGeneratedMappingServiceImpl();
54 service.setPool(SingletonHolder.CLASS_POOL);
55 service.start(getBundleContext());
59 private BundleContext getBundleContext() {
63 public void setBundleContext(BundleContext bundleContext) {
64 this.bundleContext = bundleContext;