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.JmxAttributeValidationException;
14 import org.opendaylight.controller.config.api.ModuleIdentifier;
15 import org.osgi.framework.Bundle;
17 public final class ShutdownModule extends AbstractShutdownModule {
18 private final Bundle systemBundle;
20 public ShutdownModule(ModuleIdentifier identifier, Bundle systemBundle) {
21 super(identifier, null);
22 singletonCheck(identifier);
23 this.systemBundle = systemBundle;
26 public ShutdownModule(ModuleIdentifier identifier, ShutdownModule oldModule, java.lang.AutoCloseable oldInstance,
27 Bundle systemBundle) {
28 super(identifier, null, oldModule, oldInstance);
29 singletonCheck(identifier);
30 this.systemBundle = systemBundle;
33 private static void singletonCheck(ModuleIdentifier identifier) {
34 if (AbstractShutdownModuleFactory.NAME.equals(identifier.getInstanceName()) == false) {
35 throw new IllegalArgumentException("Singleton enforcement failed. Expected instance name " + AbstractShutdownModuleFactory.NAME);
39 @Deprecated // needed for generated code
40 public ShutdownModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, ShutdownModule oldModule,
41 AutoCloseable oldInstance) {
42 super(identifier, dependencyResolver, oldModule, oldInstance);
43 throw new UnsupportedOperationException();
46 @Deprecated // needed for generated code
47 public ShutdownModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
48 super(identifier, dependencyResolver);
49 throw new UnsupportedOperationException();
53 protected void customValidation() {
54 JmxAttributeValidationException.checkNotNull(super.getSecret(), secretJmxAttribute);
58 public java.lang.AutoCloseable createInstance() {
59 return new ShutdownServiceImpl(getSecret(), systemBundle, getRootRuntimeBeanRegistratorWrapper());