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.dom.serializer.impl.RuntimeGeneratedMappingServiceImpl;
15 import org.osgi.framework.BundleContext;
17 import com.google.common.base.Preconditions;
22 public final class RuntimeMappingModule extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRuntimeMappingModule
25 private BundleContext bundleContext;
27 public RuntimeMappingModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
28 super(identifier, dependencyResolver);
31 public RuntimeMappingModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, RuntimeMappingModule oldModule, java.lang.AutoCloseable oldInstance) {
32 super(identifier, dependencyResolver, oldModule, oldInstance);
36 public void validate(){
38 Preconditions.checkNotNull(bundleContext);
39 // Add custom validation for module attributes here.
43 public boolean canReuseInstance(AbstractRuntimeMappingModule oldModule) {
48 public java.lang.AutoCloseable createInstance() {
49 RuntimeGeneratedMappingServiceImpl service = new RuntimeGeneratedMappingServiceImpl();
50 ClassPool pool = new ClassPool(); // Should be default singleton
51 service.setPool(pool);
52 service.start(getBundleContext());
56 private BundleContext getBundleContext() {
60 public void setBundleContext(BundleContext bundleContext) {
61 this.bundleContext = bundleContext;