467f0689e9b5c0d852d0cb273dac036afcab3900
[controller.git] / opendaylight / config / netty-event-executor-config / src / main / java / org / opendaylight / controller / config / yang / netty / eventexecutor / GlobalEventExecutorModuleFactory.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 /**
10  * Generated file
11
12  * Generated from: yang module name: netty-event-executor  yang module local name: netty-global-event-executor
13  * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
14  * Generated at: Tue Nov 12 10:44:21 CET 2013
15  *
16  * Do not modify this file unless it is present under src/main directory
17  */
18 package org.opendaylight.controller.config.yang.netty.eventexecutor;
19
20 import static com.google.common.base.Preconditions.checkArgument;
21 import org.opendaylight.controller.config.api.DependencyResolver;
22 import org.osgi.framework.BundleContext;
23
24 public class GlobalEventExecutorModuleFactory extends org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModuleFactory {
25     public static final String SINGLETON_NAME = "singleton";
26
27
28     @Override
29     public GlobalEventExecutorModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, GlobalEventExecutorModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
30         checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
31         GlobalEventExecutorModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule,
32                 oldInstance, bundleContext);
33         module.setBundleContext(bundleContext);
34         return module;
35     }
36
37     @Override
38     public GlobalEventExecutorModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
39         checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
40         GlobalEventExecutorModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
41         module.setBundleContext(bundleContext);
42         return module;
43     }
44 }