Fix pax exam issue
[controller.git] / opendaylight / config / netty-event-executor-config / src / main / java / org / opendaylight / controller / config / yang / netty / eventexecutor / ImmediateEventExecutorModuleFactory.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 package org.opendaylight.controller.config.yang.netty.eventexecutor;
9
10 import static com.google.common.base.Preconditions.checkArgument;
11 import org.opendaylight.controller.config.api.DependencyResolver;
12 import org.osgi.framework.BundleContext;
13
14 /**
15  * @deprecated Replaced by blueprint wiring
16  */
17 @Deprecated
18 public class ImmediateEventExecutorModuleFactory extends org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractImmediateEventExecutorModuleFactory {
19     public static final String SINGLETON_NAME = "singleton";
20
21     @Override
22     public ImmediateEventExecutorModule instantiateModule(final String instanceName, final DependencyResolver dependencyResolver, final ImmediateEventExecutorModule oldModule, final AutoCloseable oldInstance, final BundleContext bundleContext) {
23         checkArgument(SINGLETON_NAME.equals(instanceName), "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
24         return super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
25     }
26
27     @Override
28     public ImmediateEventExecutorModule instantiateModule(final String instanceName, final DependencyResolver dependencyResolver, final BundleContext bundleContext) {
29         checkArgument(SINGLETON_NAME.equals(instanceName), "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
30         return super.instantiateModule(instanceName, dependencyResolver, bundleContext);
31     }
32 }