Removed deprecated methods from BindingAwareProvider
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / BindingAwareBroker.java
index 453ff449118ffab0898f429cb02c8ec0ca8ed5ff..ab62c803e2d3e01badc4824bf548f27bd5e80226 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.sal.binding.api;
 
 import org.opendaylight.controller.md.sal.common.api.routing.RoutedRegistration;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality;
 import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -52,6 +51,12 @@ import org.osgi.framework.BundleContext;
  * and {@link ProviderContext}
  */
 public interface BindingAwareBroker {
+    /*
+     * @deprecated Use registerConsumer(BindingAwareConsumer cons) instead (BundleContext is no longer used)
+     */
+    @Deprecated
+    ConsumerContext registerConsumer(BindingAwareConsumer consumer, BundleContext ctx);
+
     /**
      * Registers the {@link BindingAwareConsumer}, which will use the SAL layer.
      *
@@ -73,7 +78,13 @@ public interface BindingAwareBroker {
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
-    ConsumerContext registerConsumer(BindingAwareConsumer consumer, BundleContext ctx);
+    ConsumerContext registerConsumer(BindingAwareConsumer consumer);
+
+    /*
+     * @deprecated Use registerProvider(BindingAwareProvider prov) instead (BundleContext is no longer used)
+     */
+    @Deprecated
+    ProviderContext registerProvider(BindingAwareProvider provider, BundleContext ctx);
 
     /**
      * Registers the {@link BindingAwareProvider}, which will use the SAL layer.
@@ -103,7 +114,7 @@ public interface BindingAwareBroker {
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
-    ProviderContext registerProvider(BindingAwareProvider provider, BundleContext ctx);
+    ProviderContext registerProvider(BindingAwareProvider provider);
 
     /**
      * {@link BindingAwareConsumer} specific access to the SAL functionality.
@@ -149,18 +160,31 @@ public interface BindingAwareBroker {
      */
     public interface ProviderContext extends ConsumerContext, RpcProviderRegistry {
 
-        @Deprecated
-        void registerFunctionality(ProviderFunctionality functionality);
-
-        @Deprecated
-        void unregisterFunctionality(ProviderFunctionality functionality);
     }
 
+    /**
+     * Represents an RPC implementation registration. Users should call the
+     * {@link ObjectRegistration#close close} method when the registration is no longer needed.
+     *
+     * @param <T> the implemented RPC service interface
+     */
     public interface RpcRegistration<T extends RpcService> extends ObjectRegistration<T> {
 
+        /**
+         * Returns the implemented RPC service interface.
+         */
         Class<T> getServiceType();
+
+        @Override
+        void close();
     }
 
+    /**
+     * Represents a routed RPC implementation registration. Users should call the
+     * {@link RoutedRegistration#close close} method when the registration is no longer needed.
+     *
+     * @param <T> the implemented RPC service interface
+     */
     public interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
             RoutedRegistration<Class<? extends BaseIdentity>, InstanceIdentifier<?>, T> {