Removed BundleContext from Broker.register{Consumer,Provider} 13/9313/1
authorEd Warnicke <eaw@cisco.com>
Fri, 25 Jul 2014 12:00:14 +0000 (07:00 -0500)
committerEd Warnicke <eaw@cisco.com>
Fri, 25 Jul 2014 12:00:14 +0000 (07:00 -0500)
Don't freak out... the old methods are still there, just
deprecated.

Change-Id: I6f37af7d93948bbf0d3b23635c73803645028ec7
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.java

index 724cbe7..b48f6cb 100644 (file)
@@ -78,13 +78,18 @@ public interface Broker {
      *
      * @param cons
      *            Consumer to be registered.
-     * @param context
      * @return a session specific to consumer registration
      * @throws IllegalArgumentException
      *             If the consumer is <code>null</code>.
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
+    ConsumerSession registerConsumer(Consumer cons);
+
+    /*
+     * @deprecated Use registerConsumer(Consumer cons) instead (BundleContext is no longer used)
+     */
+    @Deprecated
     ConsumerSession registerConsumer(Consumer cons, BundleContext context);
 
     /**
@@ -110,13 +115,18 @@ public interface Broker {
      *
      * @param prov
      *            Provider to be registered.
-     * @param context
      * @return a session unique to the provider registration.
      * @throws IllegalArgumentException
      *             If the provider is <code>null</code>.
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
+    ProviderSession registerProvider(Provider prov);
+
+    /*
+     * @deprecated Use registerProvider(Provider cons) instead (BundleContext is no longer used)
+     */
+    @Deprecated
     ProviderSession registerProvider(Provider prov, BundleContext context);
 
     /**
index 1af03e5..c15582e 100644 (file)
@@ -208,4 +208,16 @@ public class BrokerImpl implements Broker, RpcProvisionRegistry, AutoCloseable {
         return Optional.fromNullable(services.getInstance(service));
     }
 
+
+    @Override
+    public ConsumerSession registerConsumer(Consumer cons) {
+        return registerConsumer(cons,null);
+    }
+
+
+    @Override
+    public ProviderSession registerProvider(Provider prov) {
+        return registerProvider(prov,null);
+    }
+
 }

©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.