4 * Generated from: yang module name: openflow-provider-impl yang module local name: openflow-provider-impl
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Apr 02 16:59:36 PDT 2014
8 * Do not modify this file unless it is present under src/main directory
10 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.common.config.impl.rev140326;
12 import java.util.Collection;
13 import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
16 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
17 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
18 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
19 import org.opendaylight.openflowplugin.api.openflow.statistics.MessageCountDumper;
20 import org.opendaylight.openflowplugin.extension.api.ExtensionConverterRegistrator;
21 import org.opendaylight.openflowplugin.openflow.md.core.sal.OpenflowPluginProvider;
22 import org.osgi.framework.BundleContext;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
28 * @deprecated Replaced by blueprint wiring
31 public final class ConfigurableOpenFlowProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.common.config.impl.rev140326.AbstractConfigurableOpenFlowProviderModule {
33 private static final Logger LOG = LoggerFactory.getLogger(ConfigurableOpenFlowProviderModule.class);
35 private BundleContext bundleContext;
38 * @param identifier module identifier
39 * @param dependencyResolver dependency resolver
41 public ConfigurableOpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
42 super(identifier, dependencyResolver);
46 * @param identifier module identifier
47 * @param dependencyResolver dependency resolver
48 * @param oldModule old module
49 * @param oldInstance old instance
51 public ConfigurableOpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
52 ConfigurableOpenFlowProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
54 super(identifier, dependencyResolver, oldModule, oldInstance);
58 protected void customValidation() {
59 // Add custom validation for module attributes here.
63 public AutoCloseable createInstance() {
64 // The service is provided via blueprint so wait for and return it here for backwards compatibility.
65 String typeFilter = String.format("(type=%s)", getIdentifier().getInstanceName());
66 final WaitingServiceTracker<OpenflowPluginProvider> tracker = WaitingServiceTracker.create(
67 OpenflowPluginProvider.class, bundleContext, typeFilter);
68 final OpenflowPluginProvider actualService = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
70 return new OpenflowPluginProvider() {
73 // Don't close the actual service as its life cycle is controlled by blueprint.
78 public void initialization() {
79 actualService.initialization();
83 public void setSwitchConnectionProviders(Collection<SwitchConnectionProvider> switchConnectionProvider) {
84 actualService.setSwitchConnectionProviders(switchConnectionProvider);
88 public MessageCountDumper getMessageCountDumper() {
89 return actualService.getMessageCountDumper();
93 public ExtensionConverterRegistrator getExtensionConverterRegistrator() {
94 return actualService.getExtensionConverterRegistrator();
98 public void setRole(OfpRole role) {
99 actualService.setRole(role);
103 public void setSkipTableFeatures(Boolean skipTableFeatures) {
104 actualService.setSkipTableFeatures(skipTableFeatures);
108 public void fireRoleChange(OfpRole newRole) {
109 actualService.fireRoleChange(newRole);
113 public void setDataBroker(DataBroker dataBroker) {
114 actualService.setDataBroker(dataBroker);
118 public void setNotificationService(NotificationProviderService notificationService) {
119 actualService.setNotificationService(notificationService);
123 public void setRpcRegistry(RpcProviderRegistry rpcRegistry) {
124 actualService.setRpcRegistry(rpcRegistry);
128 public void setEntityOwnershipService(EntityOwnershipService entityOwnershipService) {
129 actualService.setEntityOwnershipService(entityOwnershipService);
134 public void setBundleContext(BundleContext bundleContext) {
135 this.bundleContext = bundleContext;
139 public boolean canReuseInstance(AbstractConfigurableOpenFlowProviderModule oldModule) {