2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
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
16 * Do not modify this file unless it is present under src/main directory
18 package org.opendaylight.controller.config.yang.netty.eventexecutor;
20 import io.netty.util.concurrent.EventExecutor;
21 import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker;
22 import org.opendaylight.controller.config.yang.netty.eventexecutor.AutoCloseableEventExecutor.CloseableEventExecutorMixin;
23 import org.osgi.framework.BundleContext;
26 * @deprecated Replaced by blueprint wiring
29 public final class GlobalEventExecutorModule extends
30 org.opendaylight.controller.config.yang.netty.eventexecutor.AbstractGlobalEventExecutorModule {
31 private BundleContext bundleContext;
33 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
34 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
35 super(identifier, dependencyResolver);
38 public GlobalEventExecutorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
39 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
40 GlobalEventExecutorModule oldModule, java.lang.AutoCloseable oldInstance) {
41 super(identifier, dependencyResolver, oldModule, oldInstance);
45 public void validate() {
50 public AutoCloseable createInstance() {
51 // The service is provided via blueprint so wait for and return it here for backwards compatibility.
52 final WaitingServiceTracker<EventExecutor> tracker = WaitingServiceTracker.create(
53 EventExecutor.class, bundleContext, "(type=global-event-executor)");
54 EventExecutor eventExecutor = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
55 return CloseableEventExecutorMixin.forwardingEventExecutor(eventExecutor, tracker);
58 public void setBundleContext(final BundleContext bundleContext) {
59 this.bundleContext = bundleContext;