4 * Generated from: yang module name: shutdown-impl yang module local name: shutdown
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Dec 18 14:02:06 CET 2013
8 * Do not modify this file unless it is present under src/main directory
10 package org.opendaylight.controller.config.yang.shutdown.impl;
12 import org.opendaylight.controller.config.api.DependencyResolver;
13 import org.opendaylight.controller.config.api.ModuleIdentifier;
14 import org.osgi.framework.Bundle;
15 import org.osgi.framework.BundleContext;
17 public class ShutdownModuleFactory extends AbstractShutdownModuleFactory {
20 public org.opendaylight.controller.config.spi.Module createModule(String instanceName, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.api.DynamicMBeanWithInstance old, org.osgi.framework.BundleContext bundleContext) throws Exception {
21 org.opendaylight.controller.config.yang.shutdown.impl.ShutdownModule oldModule = null;
23 oldModule = (org.opendaylight.controller.config.yang.shutdown.impl.ShutdownModule) old.getModule();
24 } catch(Exception e) {
25 return handleChangedClass(old);
27 org.opendaylight.controller.config.yang.shutdown.impl.ShutdownModule module = instantiateModule(instanceName, dependencyResolver, oldModule, old.getInstance(), bundleContext);
29 module.setOldSecret(oldModule.getActualOldSecret());
30 module.setSecret(oldModule.getActualSecret());
36 public ShutdownModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
37 ShutdownModule oldModule, AutoCloseable oldInstance,
38 BundleContext bundleContext) {
39 Bundle systemBundle = bundleContext.getBundle(0);
40 return new ShutdownModule(new ModuleIdentifier(NAME, instanceName), oldModule, oldInstance, systemBundle);
44 public ShutdownModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
45 BundleContext bundleContext) {
46 Bundle systemBundle = bundleContext.getBundle(0);
47 return new ShutdownModule(new ModuleIdentifier(NAME, instanceName), systemBundle);