Fix checkstyle violations in sal-binding-api
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / BindingAwareBroker.java
index 5e24560853e733c42744512366721a4d8b12823c..81f8124c4647f11adae697b1214510d15ad0191a 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;
@@ -18,17 +17,18 @@ import org.osgi.framework.BundleContext;
 /**
  * Binding-aware core of the SAL layer responsible for wiring the SAL consumers.
  *
+ * <p>
  * The responsibility of the broker is to maintain registration of SAL
- * functionality {@link Consumer}s and {@link Provider}s, store provider and
+ * functionality Consumers and Providers, store provider and
  * consumer specific context and functionality registration via
  * {@link ConsumerContext} and provide access to infrastructure services, which
  * removes direct dependencies between providers and consumers.
  *
+ * <p>
  * The Binding-aware broker is also responsible for translation from Java
  * classes modeling the functionality and data to binding-independent form which
  * is used in SAL Core.
  *
- *
  * <h3>Infrastructure services</h3> Some examples of infrastructure services:
  *
  * <ul>
@@ -36,22 +36,28 @@ import org.osgi.framework.BundleContext;
  * {@link ProviderContext}
  * <li>Notification Service - see {@link NotificationService} and
  * {@link NotificationProviderService}
- * <li>Functionality and Data model
- * <li>Data Store access and modification - see {@link org.opendaylight.controller.sal.binding.api.data.DataBrokerService} and
- * {@link org.opendaylight.controller.sal.binding.api.data.DataProviderService}
  * </ul>
  *
+ * <p>
  * The services are exposed via session.
  *
  * <h3>Session-based access</h3>
  *
+ * <p>
  * The providers and consumers needs to register in order to use the
  * binding-independent SAL layer and to expose functionality via SAL layer.
  *
+ * <p>
  * For more information about session-based access see {@link ConsumerContext}
  * 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.
      *
@@ -63,9 +69,9 @@ public interface BindingAwareBroker {
      * The consumer is required to use returned session for all communication
      * with broker or one of the broker services. The session is announced to
      * the consumer by invoking
-     * {@link Consumer#onSessionInitiated(ConsumerContext)}.
+     * {@link BindingAwareConsumer#onSessionInitialized(ConsumerContext)}.
      *
-     * @param cons
+     * @param consumer
      *            Consumer to be registered.
      * @return a session specific to consumer registration
      * @throws IllegalArgumentException
@@ -73,7 +79,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.
@@ -81,7 +93,7 @@ public interface BindingAwareBroker {
      * <p>
      * During the registration, the broker obtains the initial functionality
      * from consumer, using the
-     * {@link BindingAwareProvider#getImplementations()}, and register that
+     * BindingAwareProvider#getImplementations(), and register that
      * functionality into system and concrete infrastructure services.
      *
      * <p>
@@ -95,7 +107,7 @@ public interface BindingAwareBroker {
      * {@link BindingAwareProvider#onSessionInitiated(ProviderContext)}.
      *
      *
-     * @param prov
+     * @param provider
      *            Provider to be registered.
      * @return a session unique to the provider registration.
      * @throws IllegalArgumentException
@@ -103,7 +115,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.
@@ -116,13 +128,12 @@ public interface BindingAwareBroker {
      * The session serves to store SAL context (e.g. registration of
      * functionality) for the consumer and provides access to the SAL
      * infrastructure services and other functionality provided by
-     * {@link Provider}s.
+     * {@link BindingAwareProvider}s.
      */
-    public interface ConsumerContext extends RpcConsumerRegistry {
+    interface ConsumerContext extends RpcConsumerRegistry {
 
         /**
-         * Returns a session specific instance (implementation) of requested
-         * binding-aware infrastructural service
+         * Returns a session specific instance (implementation) of requested binding-aware infrastructure service.
          *
          * @param service
          *            Broker service
@@ -147,13 +158,8 @@ public interface BindingAwareBroker {
      * functionality provided by other {@link BindingAwareConsumer}s.
      *
      */
-    public interface ProviderContext extends ConsumerContext, RpcProviderRegistry {
-
-        @Deprecated
-        void registerFunctionality(ProviderFunctionality functionality);
+    interface ProviderContext extends ConsumerContext, RpcProviderRegistry {
 
-        @Deprecated
-        void unregisterFunctionality(ProviderFunctionality functionality);
     }
 
     /**
@@ -162,7 +168,7 @@ public interface BindingAwareBroker {
      *
      * @param <T> the implemented RPC service interface
      */
-    public interface RpcRegistration<T extends RpcService> extends ObjectRegistration<T> {
+    interface RpcRegistration<T extends RpcService> extends ObjectRegistration<T> {
 
         /**
          * Returns the implemented RPC service interface.
@@ -179,29 +185,21 @@ public interface BindingAwareBroker {
      *
      * @param <T> the implemented RPC service interface
      */
-    public interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
+    interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
             RoutedRegistration<Class<? extends BaseIdentity>, InstanceIdentifier<?>, T> {
 
         /**
-         * Register particular instance identifier to be processed by this
-         * RpcService
-         *
-         * Deprecated in favor of {@link RoutedRegistration#registerPath(Object, Object)}.
+         * Register particular instance identifier to be processed by this RpcService.
          *
-         * @param context
-         * @param instance
+         * @deprecated in favor of RoutedRegistration#registerPath(Object, Object).
          */
         @Deprecated
         void registerInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
 
         /**
-         * Unregister particular instance identifier to be processed by this
-         * RpcService
-         *
-         * Deprecated in favor of {@link RoutedRegistration#unregisterPath(Object, Object)}.
+         * Unregister particular instance identifier to be processed by this RpcService.
          *
-         * @param context
-         * @param instance
+         * @deprecated in favor of RoutedRegistration#unregisterPath(Class, InstanceIdentifier).
          */
         @Deprecated
         void unregisterInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);