Deprecate Broker and related APIs 45/70045/2
authorTom Pantelis <tompantelis@gmail.com>
Fri, 23 Mar 2018 22:02:03 +0000 (18:02 -0400)
committerStephen Kitt <skitt@redhat.com>
Mon, 26 Mar 2018 21:27:17 +0000 (21:27 +0000)
These are remnants of the config system and not needed for
blueprint. If we remove the config system in Flourine, perhaps we
can just remove these classes as well but deprecate for now.

Change-Id: I6c14ab3a86b11137da12a8655848a6810e47a5f6
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
13 files changed:
opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/Providers.java [deleted file]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractConsumer.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractProvider.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/BrokerService.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Consumer.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Provider.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ConsumerContextImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/BrokerModule.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/ForwardingConsumerSession.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/ForwardingProviderSession.java

diff --git a/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/Providers.java b/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/Providers.java
deleted file mode 100644 (file)
index ca69936..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.messagebus.app.util;
-
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.controller.sal.core.api.AbstractProvider;
-import org.opendaylight.controller.sal.core.api.Broker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Providers {
-    private static final Logger LOG = LoggerFactory.getLogger(Providers.class);
-
-    public static class BindingAware implements BindingAwareProvider, AutoCloseable {
-
-
-        @Override
-        public void onSessionInitiated(final BindingAwareBroker.ProviderContext session) {
-            LOG.info("BindingAwareBroker.ProviderContext initialized");
-        }
-
-        @Override
-        public void close() throws Exception {}
-    }
-
-    public static class BindingIndependent extends AbstractProvider implements AutoCloseable {
-
-        @Override
-        public void onSessionInitiated(final Broker.ProviderSession session) {
-            LOG.info("Broker.ProviderSession initialized");
-        }
-
-        @Override
-        public void close() throws Exception {}
-    }
-
-}
index 46e9cdc..2bd1235 100644 (file)
@@ -15,6 +15,12 @@ import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
+/**
+ * Deprecated.
+ *
+ * @deprecated Use blueprint instead for code wiring.
+ */
+@Deprecated
 public abstract class AbstractConsumer implements Consumer, BundleActivator,ServiceTrackerCustomizer<Broker, Broker> {
 
     private BundleContext context;
index b621e5f..5c5abe2 100644 (file)
@@ -15,6 +15,12 @@ import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
+/**
+ * Deprecated.
+ *
+ * @deprecated Use blueprint instead for code wiring.
+ */
+@Deprecated
 public abstract class AbstractProvider implements BundleActivator, Provider,ServiceTrackerCustomizer<Broker, Broker> {
 
     private Broker broker;
index 680a24c..ce64e8e 100644 (file)
@@ -31,7 +31,10 @@ import org.osgi.framework.BundleContext;
  * <p>
  * For more information about session-based access see {@link ConsumerSession}
  * and {@link ProviderSession}
+ *
+ * @deprecated Use blueprint instead for code wiring.
  */
+@Deprecated
 public interface Broker {
 
     /**
index 77622d0..27bf9c2 100644 (file)
@@ -28,8 +28,9 @@ package org.opendaylight.controller.sal.core.api;
  * YANG and to reuse it in the development of {@link Consumer}s and
  * {@link Provider}s.
  *
- *
+ * @deprecated Use blueprint instead for code wiring.
  */
+@Deprecated
 public interface BrokerService {
 
 }
index b9ac87a..0e398e5 100644 (file)
@@ -18,7 +18,10 @@ import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
  * <p>
  * A user-implemented component (application) which facilitates the SAL and SAL
  * services to access infrastructure services or providers' functionality.
+ *
+ * @deprecated Use blueprint instead for code wiring.
  */
+@Deprecated
 public interface Consumer {
 
     /**
index e6ba1cc..72968e6 100644 (file)
@@ -19,7 +19,10 @@ import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
  * A user-implemented component (application) which facilitates the SAL and SAL
  * services to access infrastructure services and to provide functionality to
  * {@link Consumer}s and other providers.
+ *
+ * @deprecated Use blueprint instead for code wiring.
  */
+@Deprecated
 public interface Provider {
 
     /**
index 581a2f9..dbf0875 100644 (file)
@@ -37,6 +37,7 @@ import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@Deprecated
 public class BrokerImpl implements Broker, DOMRpcProviderService, DOMRpcService, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(BrokerImpl.class);
 
index a4f67df..0e0088f 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.controller.sal.core.api.Consumer;
 import org.opendaylight.controller.sal.dom.broker.osgi.AbstractBrokerServiceProxy;
 import org.opendaylight.controller.sal.dom.broker.osgi.ProxyFactory;
 
+@Deprecated
 class ConsumerContextImpl implements ConsumerSession {
 
     private final ClassToInstanceMap<BrokerService> instantiatedServices = MutableClassToInstanceMap.create();
index 6bfb5d2..836e72c 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.sal.dom.broker;
 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
 import org.opendaylight.controller.sal.core.api.Provider;
 
+@Deprecated
 class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession {
     private final Provider provider;
 
index 21e41f9..d91a136 100644 (file)
@@ -13,6 +13,12 @@ import org.opendaylight.controller.sal.core.api.BrokerService;
 import org.opendaylight.controller.sal.core.api.Consumer.ConsumerFunctionality;
 import org.opendaylight.controller.sal.core.api.Provider.ProviderFunctionality;
 
+/**
+ * Deprecated.
+ *
+ * @deprecated Use blueprint instead for code wiring.
+ */
+@Deprecated
 public interface BrokerModule {
 
     Set<Class<? extends BrokerService>> getProvidedServices();
index a8c2d3e..c76ee64 100644 (file)
@@ -10,6 +10,12 @@ package org.opendaylight.controller.sal.core.spi;
 import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
 import org.opendaylight.controller.sal.core.api.BrokerService;
 
+/**
+ * Deprecated.
+ *
+ * @deprecated Use blueprint instead for code wiring.
+ */
+@Deprecated
 public abstract class ForwardingConsumerSession implements ConsumerSession {
 
     protected abstract ConsumerSession delegate();
index 87cce97..ecd6785 100644 (file)
@@ -11,6 +11,12 @@ package org.opendaylight.controller.sal.core.spi;
 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
 import org.opendaylight.controller.sal.core.api.BrokerService;
 
+/**
+ * Deprecated.
+ *
+ * @deprecated Use blueprint instead for code wiring.
+ */
+@Deprecated
 public abstract class ForwardingProviderSession implements ProviderSession {
 
     protected abstract ProviderSession delegate();

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.