Fix checkstyle violations in sal-binding-api 06/69106/2
authorTom Pantelis <tompantelis@gmail.com>
Tue, 6 Mar 2018 03:11:05 +0000 (22:11 -0500)
committerMichael Vorburger <vorburger@redhat.com>
Wed, 7 Mar 2018 12:49:54 +0000 (12:49 +0000)
Change-Id: Ic39062434dccf9616675b3616e142600f250c814
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
31 files changed:
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/BindingService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/BindingTransactionChain.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/ClusteredDataTreeChangeListener.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataBroker.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataObjectModification.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeListener.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeChangeService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeIdentifier.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/ForwardingWriteTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPoint.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/ReadOnlyTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/ReadTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/ReadWriteTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/TransactionFactory.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/WriteTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareConsumer.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareProvider.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBrokerAwareActivator.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareProvider.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcProviderRegistry.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcContextIdentifier.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcRoutingContext.java

index ccce73c7d7d8f6ccf76acab8b45a60cc0dbce7ea..f8a7bff07b3d985c108f4b0934163c753292d11d 100644 (file)
@@ -10,14 +10,15 @@ package org.opendaylight.controller.md.sal.binding.api;
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 
 /**
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 
 /**
- *
  * Marker interface for MD-SAL services which are available for users of MD-SAL.
  *
  * Marker interface for MD-SAL services which are available for users of MD-SAL.
  *
+ * <p>
  * BindingService is marker interface for infrastructure services provided by
  * the SAL. These services may be session-specific, and wrapped by custom
  * delegator patterns in order to introduce additional semantics / checks
  * to the system.
  *
  * BindingService is marker interface for infrastructure services provided by
  * the SAL. These services may be session-specific, and wrapped by custom
  * delegator patterns in order to introduce additional semantics / checks
  * to the system.
  *
+ * <p>
  * This interface extends {@link BindingAwareService}, order to be make
  * new services available via
  * {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext}
  * This interface extends {@link BindingAwareService}, order to be make
  * new services available via
  * {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext}
index c71aa049c0622397773d5547faa773aac45ad7fd..b28fbe459cccf1944e8e738489555e93e6bbb12e 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A chain of transactions.
 
 /**
  * A chain of transactions.
+ *
  * <p>
  * For more information about transaction chaining and transaction chains
  * see {@link TransactionChain}.
  * <p>
  * For more information about transaction chaining and transaction chains
  * see {@link TransactionChain}.
@@ -20,22 +21,14 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @see TransactionChain
  *
  */
  * @see TransactionChain
  *
  */
-public interface BindingTransactionChain extends TransactionFactory, TransactionChain<InstanceIdentifier<?>, DataObject> {
-    /**
-     * {@inheritDoc}
-     */
+public interface BindingTransactionChain extends TransactionFactory,
+        TransactionChain<InstanceIdentifier<?>, DataObject> {
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     ReadWriteTransaction newReadWriteTransaction();
 
     @Override
     ReadWriteTransaction newReadWriteTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     WriteTransaction newWriteOnlyTransaction();
 }
     @Override
     WriteTransaction newWriteOnlyTransaction();
 }
index 557541424ee41c664d13327990af32e666321f83..aa4d8d34c6e300afc54217e1990c56810b8eceb0 100644 (file)
@@ -12,6 +12,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 /**
  * ClusteredDataTreeChangeListener is a marker interface to enable data tree change notifications on all
  * instances in a cluster where this listener is registered.
 /**
  * ClusteredDataTreeChangeListener is a marker interface to enable data tree change notifications on all
  * instances in a cluster where this listener is registered.
+ *
  * <p>
  * Applications should implement ClusteredDataTreeChangeListener instead of {@link DataTreeChangeListener},
  * if they want to listen for data tree change notifications on any node of a clustered data store.
  * <p>
  * Applications should implement ClusteredDataTreeChangeListener instead of {@link DataTreeChangeListener},
  * if they want to listen for data tree change notifications on any node of a clustered data store.
index 8b085bae2d283d9761136e4ef37c3ac9545c6058..d5c794336df85217278514fac70161d5e9aebebe 100644 (file)
@@ -18,6 +18,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 /**
  * Provides access to a conceptual data tree store and also provides the ability to
  * subscribe for changes to data under a given branch of the tree.
 /**
  * Provides access to a conceptual data tree store and also provides the ability to
  * subscribe for changes to data under a given branch of the tree.
+ *
  * <p>
  * For more information on usage, please see the documentation in {@link AsyncDataBroker}.
  *
  * <p>
  * For more information on usage, please see the documentation in {@link AsyncDataBroker}.
  *
@@ -25,35 +26,21 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @see TransactionChainFactory
  */
 public interface DataBroker extends  AsyncDataBroker<InstanceIdentifier<?>, DataObject, DataChangeListener>,
  * @see TransactionChainFactory
  */
 public interface DataBroker extends  AsyncDataBroker<InstanceIdentifier<?>, DataObject, DataChangeListener>,
-    TransactionChainFactory<InstanceIdentifier<?>, DataObject>, TransactionFactory, BindingService, DataTreeChangeService {
-    /**
-     * {@inheritDoc}
-     */
+        TransactionChainFactory<InstanceIdentifier<?>, DataObject>, TransactionFactory, BindingService,
+        DataTreeChangeService {
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     ReadWriteTransaction newReadWriteTransaction();
 
     @Override
     ReadWriteTransaction newReadWriteTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     WriteTransaction newWriteOnlyTransaction();
 
     @Override
     WriteTransaction newWriteOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     ListenerRegistration<DataChangeListener> registerDataChangeListener(LogicalDatastoreType store,
             InstanceIdentifier<?> path, DataChangeListener listener, DataChangeScope triggeringScope);
 
     @Override
     ListenerRegistration<DataChangeListener> registerDataChangeListener(LogicalDatastoreType store,
             InstanceIdentifier<?> path, DataChangeListener listener, DataChangeScope triggeringScope);
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     BindingTransactionChain createTransactionChain(TransactionChainListener listener);
 }
     @Override
     BindingTransactionChain createTransactionChain(TransactionChainListener listener);
 }
index f8dd3b0cceed32e7dacfdf2e37adb998ff92f087..2df4f8bde0518065a5f05eec3220cae33bbb9819 100644 (file)
@@ -19,28 +19,25 @@ import org.opendaylight.yangtools.yang.binding.Identifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 
 /**
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 
 /**
- * Modified Data Object.
- *
- * Represents modification of Data Object.
- *
+ * Represents a modification of DataObject.
  */
  */
-public interface DataObjectModification<T extends DataObject> extends org.opendaylight.yangtools.concepts.Identifiable<PathArgument> {
+public interface DataObjectModification<T extends DataObject>
+        extends org.opendaylight.yangtools.concepts.Identifiable<PathArgument> {
 
     enum ModificationType {
         /**
 
     enum ModificationType {
         /**
-         *
          * Child node (direct or indirect) was modified.
          *
          */
         SUBTREE_MODIFIED,
          * Child node (direct or indirect) was modified.
          *
          */
         SUBTREE_MODIFIED,
+
         /**
         /**
-         *
          * Node was explicitly created / overwritten.
          *
          */
          * Node was explicitly created / overwritten.
          *
          */
+
         WRITE,
         /**
         WRITE,
         /**
-         *
          * Node was deleted.
          *
          */
          * Node was deleted.
          *
          */
@@ -58,8 +55,7 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
     @Nonnull Class<T> getDataType();
 
     /**
     @Nonnull Class<T> getDataType();
 
     /**
-     *
-     * Returns type of modification
+     * Returns type of modification.
      *
      * @return type Type of performed modification.
      */
      *
      * @return type Type of performed modification.
      */
@@ -89,9 +85,9 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
     @Nonnull Collection<DataObjectModification<? extends DataObject>> getModifiedChildren();
 
     /**
     @Nonnull Collection<DataObjectModification<? extends DataObject>> getModifiedChildren();
 
     /**
-     * Returns container child modification if {@code child} was modified by this
-     * modification.
+     * Returns container child modification if {@code child} was modified by this modification.
      *
      *
+     * <p>
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param child Type of child - must be only container
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param child Type of child - must be only container
@@ -99,12 +95,13 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code child} class is not valid child according
      *         to generated model.
      */
      * @throws IllegalArgumentException If supplied {@code child} class is not valid child according
      *         to generated model.
      */
-    @Nullable <C extends ChildOf<? super T>> DataObjectModification<C> getModifiedChildContainer(@Nonnull Class<C> child);
+    @Nullable <C extends ChildOf<? super T>> DataObjectModification<C> getModifiedChildContainer(
+            @Nonnull Class<C> child);
 
     /**
 
     /**
-     * Returns augmentation child modification if {@code augmentation} was modified by this
-     * modification.
+     * Returns augmentation child modification if {@code augmentation} was modified by this modification.
      *
      *
+     * <p>
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param augmentation Type of augmentation - must be only container
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param augmentation Type of augmentation - must be only container
@@ -112,7 +109,8 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code augmentation} class is not valid augmentation
      *         according to generated model.
      */
      * @throws IllegalArgumentException If supplied {@code augmentation} class is not valid augmentation
      *         according to generated model.
      */
-    @Nullable <C extends Augmentation<T> & DataObject> DataObjectModification<C> getModifiedAugmentation(@Nonnull Class<C> augmentation);
+    @Nullable <C extends Augmentation<T> & DataObject> DataObjectModification<C> getModifiedAugmentation(
+            @Nonnull Class<C> augmentation);
 
 
     /**
 
 
     /**
@@ -124,8 +122,8 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code listItem} class is not valid child according
      *         to generated model.
      */
      * @throws IllegalArgumentException If supplied {@code listItem} class is not valid child according
      *         to generated model.
      */
-    <C extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<C>> DataObjectModification<C> getModifiedChildListItem(
-            @Nonnull Class<C> listItem,@Nonnull  K listKey);
+    <C extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<C>> DataObjectModification<C>
+            getModifiedChildListItem(@Nonnull Class<C> listItem,@Nonnull  K listKey);
 
     /**
      * Returns a child modification if a node identified by {@code childArgument} was modified by
 
     /**
      * Returns a child modification if a node identified by {@code childArgument} was modified by
@@ -139,5 +137,4 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      *
      */
     @Nullable DataObjectModification<? extends DataObject> getModifiedChild(PathArgument childArgument);
      *
      */
     @Nullable DataObjectModification<? extends DataObject> getModifiedChild(PathArgument childArgument);
-
 }
 }
index d52835b7ed090dc4972b83b366ae859c35899997..6d6ea17a3564508b131c398bccd99541a84dc5df 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
  * data tree changes. This interface differs from {@link DataChangeListener}
  * in that it provides a cursor-based view of the change, which has potentially
  * lower overhead and allow more flexible consumption of change event.
  * data tree changes. This interface differs from {@link DataChangeListener}
  * in that it provides a cursor-based view of the change, which has potentially
  * lower overhead and allow more flexible consumption of change event.
+ *
  * <p>
  * Note: this interface enables notifications only at the leader of the data store, if clustered. If you want
  * notifications on all instances in a cluster, use the {@link ClusteredDataTreeChangeListener}.
  * <p>
  * Note: this interface enables notifications only at the leader of the data store, if clustered. If you want
  * notifications on all instances in a cluster, use the {@link ClusteredDataTreeChangeListener}.
@@ -37,6 +38,7 @@ public interface DataTreeChangeListener<T extends DataObject> extends EventListe
      * to recover from such events. Event producers are expected to exert reasonable
      * effort to suppress such events.
      *
      * to recover from such events. Event producers are expected to exert reasonable
      * effort to suppress such events.
      *
+     * <p>
      * In other words, it is completely acceptable to observe
      * a {@link DataObjectModification}, while the state observed before and
      * after- data items compare as equal.
      * In other words, it is completely acceptable to observe
      * a {@link DataObjectModification}, while the state observed before and
      * after- data items compare as equal.
index f899eb13e42886807cfe2e57c920c89f805dc71b..11697bfc85e3bfdc35125ba5ca8475b060843a6e 100644 (file)
@@ -20,14 +20,16 @@ public interface DataTreeChangeService extends BindingService {
      * Registers a {@link DataTreeChangeListener} to receive
      * notifications when data changes under a given path in the conceptual data
      * tree.
      * Registers a {@link DataTreeChangeListener} to receive
      * notifications when data changes under a given path in the conceptual data
      * tree.
+     *
      * <p>
      * You are able to register for notifications  for any node or subtree
      * which can be represented using {@link DataTreeIdentifier}.
      * <p>
      * You are able to register for notifications  for any node or subtree
      * which can be represented using {@link DataTreeIdentifier}.
-     * <p>
      *
      *
+     * <p>
      * You are able to register for data change notifications for a subtree or leaf
      * even if it does not exist. You will receive notification once that node is
      * created.
      * You are able to register for data change notifications for a subtree or leaf
      * even if it does not exist. You will receive notification once that node is
      * created.
+     *
      * <p>
      * If there is any pre-existing data in the data tree for the path for which you are
      * registering, you will receive an initial data change event, which will
      * <p>
      * If there is any pre-existing data in the data tree for the path for which you are
      * registering, you will receive an initial data change event, which will
@@ -37,6 +39,7 @@ public interface DataTreeChangeService extends BindingService {
      * This method returns a {@link ListenerRegistration} object. To
      * "unregister" your listener for changes call the {@link ListenerRegistration#close()}
      * method on the returned object.
      * This method returns a {@link ListenerRegistration} object. To
      * "unregister" your listener for changes call the {@link ListenerRegistration#close()}
      * method on the returned object.
+     *
      * <p>
      * You MUST explicitly unregister your listener when you no longer want to receive
      * notifications. This is especially true in OSGi environments, where failure to
      * <p>
      * You MUST explicitly unregister your listener when you no longer want to receive
      * notifications. This is especially true in OSGi environments, where failure to
@@ -51,5 +54,6 @@ public interface DataTreeChangeService extends BindingService {
      *         your listener using {@link ListenerRegistration#close()} to stop
      *         delivery of change events.
      */
      *         your listener using {@link ListenerRegistration#close()} to stop
      *         delivery of change events.
      */
-    @Nonnull <T extends DataObject,L extends DataTreeChangeListener<T>> ListenerRegistration<L> registerDataTreeChangeListener(@Nonnull DataTreeIdentifier<T> treeId, @Nonnull L listener);
+    @Nonnull <T extends DataObject,L extends DataTreeChangeListener<T>> ListenerRegistration<L>
+            registerDataTreeChangeListener(@Nonnull DataTreeIdentifier<T> treeId, @Nonnull L listener);
 }
 }
index 13d0a92600ddefc43ed8ebd67b573007705648d9..79b2a6d5268dd6b527d278bed3b5ce07c62370ec 100644 (file)
@@ -20,7 +20,8 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * A unique identifier for a particular subtree. It is composed of the logical
  * data store type and the instance identifier of the root node.
  */
  * A unique identifier for a particular subtree. It is composed of the logical
  * data store type and the instance identifier of the root node.
  */
-public final class DataTreeIdentifier<T extends DataObject> implements Immutable, Path<DataTreeIdentifier<?>>, Serializable {
+public final class DataTreeIdentifier<T extends DataObject> implements Immutable,
+        Path<DataTreeIdentifier<?>>, Serializable {
     private static final long serialVersionUID = 1L;
     private final InstanceIdentifier<T> rootIdentifier;
     private final LogicalDatastoreType datastoreType;
     private static final long serialVersionUID = 1L;
     private final InstanceIdentifier<T> rootIdentifier;
     private final LogicalDatastoreType datastoreType;
@@ -79,7 +80,7 @@ public final class DataTreeIdentifier<T extends DataObject> implements Immutable
 
     @Override
     public String toString() {
 
     @Override
     public String toString() {
-        return getClass().getSimpleName() + "{datastoreType = " + datastoreType + ", rootIdentifier = " +
-                rootIdentifier + "}";
+        return getClass().getSimpleName() + "{datastoreType = " + datastoreType + ", rootIdentifier = "
+                rootIdentifier + "}";
     }
 }
     }
 }
index e6027430cec17b665bb74601f6d846434de2b1ee..13151eef8a5a722bce4c5b05fb8b774d3b7ee76d 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.md.sal.binding.api;
 import com.google.common.collect.ForwardingObject;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.collect.ForwardingObject;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.ListenableFuture;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
@@ -82,5 +81,4 @@ public class ForwardingWriteTransaction extends ForwardingObject implements Writ
     public Object getIdentifier() {
         return delegate.getIdentifier();
     }
     public Object getIdentifier() {
         return delegate.getIdentifier();
     }
-
 }
 }
index e8bd753bbae6efeaf3db56cbc00fe7eb462588b9..0c676e06539ef23e13b48544e76561cd16a443aa 100644 (file)
@@ -11,8 +11,6 @@ import com.google.common.base.Optional;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public interface MountPoint extends Identifiable<InstanceIdentifier<?>>{
-
+public interface MountPoint extends Identifiable<InstanceIdentifier<?>> {
     <T extends BindingService> Optional<T> getService(Class<T> service);
     <T extends BindingService> Optional<T> getService(Class<T> service);
-
 }
 }
index 393839ce58e66fd77be6b99b38ab8b5be7db804d..db36d3001fb2ac1f752bcbf69d89b1e7ffe5adba 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  * - {@link #offerNotification(Notification, int, TimeUnit)}, which may block
  *   for specified time if resources are thin.
  *
  * - {@link #offerNotification(Notification, int, TimeUnit)}, which may block
  *   for specified time if resources are thin.
  *
+ * <p>
  * The actual delivery to listeners is asynchronous and implementation-specific.
  * Users of this interface should not make any assumptions as to whether the
  * notification has or has not been seen.
  * The actual delivery to listeners is asynchronous and implementation-specific.
  * Users of this interface should not make any assumptions as to whether the
  * notification has or has not been seen.
@@ -33,7 +34,8 @@ public interface NotificationPublishService extends BindingService {
      * Well-known value indicating that the binding-aware implementation is currently not
      * able to accept a notification.
      */
      * Well-known value indicating that the binding-aware implementation is currently not
      * able to accept a notification.
      */
-    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new NotificationRejectedException("Rejected due to resource constraints."));
+    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new NotificationRejectedException(
+            "Rejected due to resource constraints."));
 
     /**
      * Publishes a notification to subscribed listeners. This initiates
 
     /**
      * Publishes a notification to subscribed listeners. This initiates
@@ -56,13 +58,14 @@ public interface NotificationPublishService extends BindingService {
      * listeners can happen asynchronously, potentially after a call to
      * this method returns.
      *
      * listeners can happen asynchronously, potentially after a call to
      * this method returns.
      *
+     * <p>
      * Still guaranteed not to block. Returns Listenable Future which will complete once.
      *
      * @param notification
      *            the notification to publish.
      * @return A listenable future which will report completion when the service has finished
      * Still guaranteed not to block. Returns Listenable Future which will complete once.
      *
      * @param notification
      *            the notification to publish.
      * @return A listenable future which will report completion when the service has finished
-     * propagating the notification to its immediate registrants, or {@link #REJECTED} if resource
-     * constraints prevent
+     *     propagating the notification to its immediate registrants, or {@link #REJECTED} if resource
+     *     constraints prevent
      * @throws NullPointerException if the notification is null
      */
     ListenableFuture<?> offerNotification(Notification notification);
      * @throws NullPointerException if the notification is null
      */
     ListenableFuture<?> offerNotification(Notification notification);
@@ -80,8 +83,8 @@ public interface NotificationPublishService extends BindingService {
      * @param unit a TimeUnit determining how to interpret the
      *             timeout parameter
      * @return A listenable future which will report completion when the service has finished
      * @param unit a TimeUnit determining how to interpret the
      *             timeout parameter
      * @return A listenable future which will report completion when the service has finished
-     * propagating the notification to its immediate registrants, or {@link #REJECTED} if resource
-     * constraints prevent
+     *     propagating the notification to its immediate registrants, or {@link #REJECTED} if resource
+     *     constraints prevent
      * @throws InterruptedException if interrupted while waiting
      * @throws NullPointerException if the notification or unit is null
      * @throws IllegalArgumentException if timeout is negative.
      * @throws InterruptedException if interrupted while waiting
      * @throws NullPointerException if the notification or unit is null
      * @throws IllegalArgumentException if timeout is negative.
index c0e8ea5fee712047c347e14b758228532006ad6d..3744eeef99494c1d2b8990e0bc9f73ff248799e8 100644 (file)
@@ -13,15 +13,17 @@ import org.opendaylight.yangtools.yang.binding.NotificationListener;
 /**
  * Notification broker which allows clients to subscribe for and publish YANG-modeled notifications.
  *
 /**
  * Notification broker which allows clients to subscribe for and publish YANG-modeled notifications.
  *
+ * <p>
  * Each YANG module which defines notifications results in a generated interface <code>{ModuleName}Listener</code>
  * which handles all the notifications defined in the YANG model. Each notification type translates to
  * a specific method of the form <code>on{NotificationType}</code> on the generated interface.
  * The generated interface also extends the
  * {@link org.opendaylight.yangtools.yang.binding.NotificationListener} interface and implementations
  * Each YANG module which defines notifications results in a generated interface <code>{ModuleName}Listener</code>
  * which handles all the notifications defined in the YANG model. Each notification type translates to
  * a specific method of the form <code>on{NotificationType}</code> on the generated interface.
  * The generated interface also extends the
  * {@link org.opendaylight.yangtools.yang.binding.NotificationListener} interface and implementations
- * are registered using {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)}
- * method.
+ * are registered using
+ *  {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)} method.
  *
  * <h3>Dispatch Listener Example</h3>
  *
  * <h3>Dispatch Listener Example</h3>
+ *
  * <p>
  * Lets assume we have following YANG model:
  *
  * <p>
  * Lets assume we have following YANG model:
  *
@@ -39,6 +41,7 @@ import org.opendaylight.yangtools.yang.binding.NotificationListener;
  * }
  * </pre>
  *
  * }
  * </pre>
  *
+ * <p>
  * The generated interface will be:
  * {@code
  *  public interface ExampleListener extends NotificationListener {
  * The generated interface will be:
  * {@code
  *  public interface ExampleListener extends NotificationListener {
index f3b42b96f0139f7d881ebec492decd6427f8c45e..5e76e2183bea0800e30000c97a5b51359bc69a1b 100644 (file)
@@ -13,10 +13,11 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A transaction that provides a stateful read-only view of the data tree.
 
 /**
  * A transaction that provides a stateful read-only view of the data tree.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in
  *  {@link org.opendaylight.controller.md.sal.common.api.data.AsyncReadTransaction}.
  */
  * <p>
  * For more information on usage and examples, please see the documentation in
  *  {@link org.opendaylight.controller.md.sal.common.api.data.AsyncReadTransaction}.
  */
-public interface ReadOnlyTransaction extends ReadTransaction, AsyncReadOnlyTransaction<InstanceIdentifier<?>, DataObject> {
-
+public interface ReadOnlyTransaction extends ReadTransaction, AsyncReadOnlyTransaction<InstanceIdentifier<?>,
+        DataObject> {
 }
 }
index b0c93734e09dba7f964701f4875f10a6f69d297f..21bcf23cd468a4f09570a6d8d4c40fb8699bfae2 100644 (file)
@@ -7,17 +7,17 @@
  */
 package org.opendaylight.controller.md.sal.binding.api;
 
  */
 package org.opendaylight.controller.md.sal.binding.api;
 
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncReadTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.controller.md.sal.common.api.data.AsyncReadTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
-
 /**
  * A transaction that provides read access to a logical data store.
 /**
  * A transaction that provides read access to a logical data store.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncReadTransaction}.
  */
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncReadTransaction}.
  */
index 9fbbbe5a738994b5a01813ecc782c3c6097084a0..99da3b6826ce9528894c90c1cafe5260b1c8bb1a 100644 (file)
@@ -13,9 +13,10 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A transaction that enables combined read/write capabilities.
 
 /**
  * A transaction that enables combined read/write capabilities.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncReadWriteTransaction}.
  */
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncReadWriteTransaction}.
  */
-public interface ReadWriteTransaction extends ReadTransaction, WriteTransaction, AsyncReadWriteTransaction<InstanceIdentifier<?>, DataObject> {
-
+public interface ReadWriteTransaction extends ReadTransaction, WriteTransaction,
+        AsyncReadWriteTransaction<InstanceIdentifier<?>, DataObject> {
 }
 }
index 1f0a6fcf01e78c805fe31e99ec83295a05a290f4..fee1b7c8d01fd6993b8f027c119ce1c6d9a16d8e 100644 (file)
@@ -12,8 +12,7 @@ import org.opendaylight.controller.md.sal.common.api.data.AsyncDataTransactionFa
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public interface TransactionFactory extends AsyncDataTransactionFactory<InstanceIdentifier<?>, DataObject>{
-
+public interface TransactionFactory extends AsyncDataTransactionFactory<InstanceIdentifier<?>, DataObject> {
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
     @Override
     ReadOnlyTransaction newReadOnlyTransaction();
 
@@ -22,5 +21,4 @@ public interface TransactionFactory extends AsyncDataTransactionFactory<Instance
 
     @Override
     WriteTransaction newWriteOnlyTransaction();
 
     @Override
     WriteTransaction newWriteOnlyTransaction();
-
 }
 }
index d99150881ac6f60350379d7f5b78b30e2b184c30..7a11e8cb9f375712c0db86f834703ddbc0fcd6dc 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A transaction that provides mutation capabilities on a data tree.
 
 /**
  * A transaction that provides mutation capabilities on a data tree.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
  */
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
  */
index fc9d9fa2bae6a7db9991020fb62aefcda2e50d49..031c157026e369f0cdc224d4677062d6cd30ea94 100644 (file)
@@ -10,11 +10,10 @@ package org.opendaylight.controller.sal.binding.api;
 import org.osgi.framework.BundleContext;
 
 @Deprecated
 import org.osgi.framework.BundleContext;
 
 @Deprecated
-public abstract class AbstractBindingAwareConsumer extends AbstractBrokerAwareActivator implements BindingAwareConsumer {
-
+public abstract class AbstractBindingAwareConsumer extends AbstractBrokerAwareActivator
+        implements BindingAwareConsumer {
     @Override
     protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
         broker.registerConsumer(this, context);
     }
     @Override
     protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
         broker.registerConsumer(this, context);
     }
-
 }
 }
index 0b9c604c2b95b3fe004539b4b9852064a6d5ec7e..967bbbf2c4e08b2536379a5ca3dba8ab696b5cc1 100644 (file)
@@ -7,14 +7,13 @@
  */
 package org.opendaylight.controller.sal.binding.api;
 
  */
 package org.opendaylight.controller.sal.binding.api;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.osgi.framework.BundleContext;
 
 @Deprecated
 import org.osgi.framework.BundleContext;
 
 @Deprecated
-public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator implements BindingAwareProvider {
-
+public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator
+        implements BindingAwareProvider {
     @Override
     protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
     @Override
     protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
-        ProviderContext ctx = broker.registerProvider(this, context);
+        broker.registerProvider(this, context);
     }
 }
     }
 }
index a489e63410125ed0486c86626af9871bf19a03f8..83af462af3d54753bd4ef8168a95adcc7a2ecf85 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.controller.sal.binding.api;
 
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -18,16 +18,17 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
 public abstract class AbstractBrokerAwareActivator implements BundleActivator {
 
 
 public abstract class AbstractBrokerAwareActivator implements BundleActivator {
 
-    private static final ExecutorService mdActivationPool = Executors.newCachedThreadPool();
+    private static final ExecutorService MD_ACTIVATION_POOL = Executors.newCachedThreadPool();
     private BundleContext context;
     private ServiceTracker<BindingAwareBroker, BindingAwareBroker> tracker;
     private BindingAwareBroker broker;
     private BundleContext context;
     private ServiceTracker<BindingAwareBroker, BindingAwareBroker> tracker;
     private BindingAwareBroker broker;
-    private ServiceTrackerCustomizer<BindingAwareBroker, BindingAwareBroker> customizer = new ServiceTrackerCustomizer<BindingAwareBroker, BindingAwareBroker>() {
+    private final ServiceTrackerCustomizer<BindingAwareBroker, BindingAwareBroker> customizer =
+            new ServiceTrackerCustomizer<BindingAwareBroker, BindingAwareBroker>() {
 
         @Override
         public BindingAwareBroker addingService(ServiceReference<BindingAwareBroker> reference) {
             broker = context.getService(reference);
 
         @Override
         public BindingAwareBroker addingService(ServiceReference<BindingAwareBroker> reference) {
             broker = context.getService(reference);
-            mdActivationPool.execute(() -> onBrokerAvailable(broker, context));
+            MD_ACTIVATION_POOL.execute(() -> onBrokerAvailable(broker, context));
             return broker;
         }
 
             return broker;
         }
 
@@ -40,17 +41,17 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
         @Override
         public void removedService(ServiceReference<BindingAwareBroker> reference, BindingAwareBroker service) {
             broker = context.getService(reference);
         @Override
         public void removedService(ServiceReference<BindingAwareBroker> reference, BindingAwareBroker service) {
             broker = context.getService(reference);
-            mdActivationPool.execute(() -> onBrokerRemoved(broker, context));
+            MD_ACTIVATION_POOL.execute(() -> onBrokerRemoved(broker, context));
         }
 
     };
 
 
     @Override
         }
 
     };
 
 
     @Override
-    public final void start(BundleContext context) throws Exception {
-        this.context = context;
-        startImpl(context);
-        tracker = new ServiceTracker<>(context, BindingAwareBroker.class, customizer);
+    public final void start(BundleContext bundleContext) throws Exception {
+        this.context = bundleContext;
+        startImpl(bundleContext);
+        tracker = new ServiceTracker<>(bundleContext, BindingAwareBroker.class, customizer);
         tracker.open();
 
     }
         tracker.open();
 
     }
@@ -58,12 +59,11 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
 
 
     @Override
 
 
     @Override
-    public final  void stop(BundleContext context) throws Exception {
+    public final  void stop(BundleContext bundleContext) throws Exception {
         tracker.close();
         tracker.close();
-        stopImpl(context);
+        stopImpl(bundleContext);
     }
 
     }
 
-
     /**
      * Called when this bundle is started (before
      * {@link BindingAwareProvider#onSessionInitiated(ProviderContext)} so the Framework can perform
     /**
      * Called when this bundle is started (before
      * {@link BindingAwareProvider#onSessionInitiated(ProviderContext)} so the Framework can perform
@@ -74,7 +74,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
      * <p>
      * This method must complete and return to its caller in a timely manner.
      *
      * <p>
      * This method must complete and return to its caller in a timely manner.
      *
-     * @param context
+     * @param bundleContext
      *            The execution context of the bundle being started.
      * @throws RuntimeException
      *             If this method throws an exception, this bundle is marked as
      *            The execution context of the bundle being started.
      * @throws RuntimeException
      *             If this method throws an exception, this bundle is marked as
@@ -82,7 +82,7 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
      *             listeners, unregister all services registered by this bundle,
      *             and release all services used by this bundle.
      */
      *             listeners, unregister all services registered by this bundle,
      *             and release all services used by this bundle.
      */
-    protected void startImpl(BundleContext context) {
+    protected void startImpl(BundleContext bundleContext) {
         // NOOP
     }
 
         // NOOP
     }
 
@@ -97,20 +97,19 @@ public abstract class AbstractBrokerAwareActivator implements BundleActivator {
      * <p>
      * This method must complete and return to its caller in a timely manner.
      *
      * <p>
      * This method must complete and return to its caller in a timely manner.
      *
-     * @param context The execution context of the bundle being stopped.
+     * @param bundleContext The execution context of the bundle being stopped.
      * @throws RuntimeException If this method throws an exception, the bundle is still
      *         marked as stopped, and the Framework will remove the bundle's
      *         listeners, unregister all services registered by the bundle, and
      *         release all services used by the bundle.
      */
      * @throws RuntimeException If this method throws an exception, the bundle is still
      *         marked as stopped, and the Framework will remove the bundle's
      *         listeners, unregister all services registered by the bundle, and
      *         release all services used by the bundle.
      */
-    protected void stopImpl(BundleContext context) {
+    protected void stopImpl(BundleContext bundleContext) {
         // NOOP
     }
 
         // NOOP
     }
 
+    protected abstract void onBrokerAvailable(BindingAwareBroker bindingBroker, BundleContext bundleContext);
 
 
-    protected abstract void onBrokerAvailable(BindingAwareBroker broker, BundleContext context);
-
-    protected void onBrokerRemoved(BindingAwareBroker broker, BundleContext context) {
-        stopImpl(context);
+    protected void onBrokerRemoved(BindingAwareBroker bindingBroker, BundleContext bundleContext) {
+        stopImpl(bundleContext);
     }
 }
     }
 }
index 2841bb77b02223da5fb7e6f806e30c94f02d5e4a..81f8124c4647f11adae697b1214510d15ad0191a 100644 (file)
@@ -17,17 +17,18 @@ import org.osgi.framework.BundleContext;
 /**
  * Binding-aware core of the SAL layer responsible for wiring the SAL consumers.
  *
 /**
  * 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 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.
  *
  * The responsibility of the broker is to maintain registration of SAL
  * 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.
  *
  * 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>
  * <h3>Infrastructure services</h3> Some examples of infrastructure services:
  *
  * <ul>
@@ -37,13 +38,16 @@ import org.osgi.framework.BundleContext;
  * {@link NotificationProviderService}
  * </ul>
  *
  * {@link NotificationProviderService}
  * </ul>
  *
+ * <p>
  * The services are exposed via session.
  *
  * <h3>Session-based access</h3>
  *
  * 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.
  *
  * 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}
  */
  * For more information about session-based access see {@link ConsumerContext}
  * and {@link ProviderContext}
  */
@@ -129,8 +133,7 @@ public interface BindingAwareBroker {
     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
          *
          * @param service
          *            Broker service
@@ -186,25 +189,17 @@ public interface BindingAwareBroker {
             RoutedRegistration<Class<? extends BaseIdentity>, InstanceIdentifier<?>, T> {
 
         /**
             RoutedRegistration<Class<? extends BaseIdentity>, InstanceIdentifier<?>, T> {
 
         /**
-         * Register particular instance identifier to be processed by this
-         * RpcService
-         *
-         * Deprecated in favor of 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);
 
         /**
          */
         @Deprecated
         void registerInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
 
         /**
-         * Unregister particular instance identifier to be processed by this
-         * RpcService
-         *
-         * Deprecated in favor of RoutedRegistration#unregisterPath(Class, InstanceIdentifier).
+         * 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);
          */
         @Deprecated
         void unregisterInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
index b3b3e07b5e38e948801eb8c3c73d18d876761410..d194591a88f2053176236cf3946f8c7783088021 100644 (file)
@@ -10,75 +10,83 @@ package org.opendaylight.controller.sal.binding.api;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
 
 /**
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
 
 /**
-*
-* A developer implemented component that gets registered with the Broker.
-*
-* Semantically, a consumer may:
-*
-* <ol>
-*   <li>Subscribe for Notifications </li>
-*   <li>Invoke RPCs</li>
-*   <li>Read from either the operational or config data tree</li>
-*   <li>Write to the config data tree</li>
-* </ol>
-* If you need to:
-* <ol>
-*   <li> Emit Notifications</li>
-*   <li> Provide the implementation of RPCs </li>
-*   <li> Write to the operational data tree </li>
-* </ol>
-*
-* Consider using a BindingAwareProvider
-*
-* Examples:
-*
-* To get a NotificationService:
-*
-* {code
-* public void onSessionInitiated(ProviderContext session) {
-*      NotificationProviderService notificationService = session.getSALService(NotificationProviderService.class);
-*      notificationService.publish(notification)
-* }
-* where notification is an instance of a modeled Notification.
-* For more information on sending notifications via the NotificationProviderService
-* @see org.opendaylight.controller.sal.binding.api.NotificationProviderService
-*
-*
-* A consumer can *invoke* and RPC ( ie, call foo(fooArgs)) but it cannot register an RPC
-* implementation with the MD-SAL that others can invoke(call).
-* To get an invokable RPC:
-*
-* {code
-* public void onSessionInitiated(ProviderContext session) {
-*    MyService rpcFlowSalService = session.getRpcService(MyService.class);
-* }
-*
-* Where MyService.class is a Service interface generated from a yang model with RPCs modeled in it.  The returned
-* rpcFlowSalService can be used like any other object by invoking its methods.  Note, nothing special needs to be done
-* for RoutedRPCs.  They just work.
-*
-* To get a DataBroker to allow access to the data tree:
-*
-* {code
-* public void onSessionInitiated(final ProviderContext session) {
-*      DataBroker databroker = session.getSALService(BindingDataBroker.class);
-* }
-* }
+ * A developer implemented component that gets registered with the Broker.
+ *
+ * <p>
+ * Semantically, a consumer may:
+ *
+ * <ol>
+ *   <li>Subscribe for Notifications </li>
+ *   <li>Invoke RPCs</li>
+ *   <li>Read from either the operational or config data tree</li>
+ *   <li>Write to the config data tree</li>
+ * </ol>
+ * If you need to:
+ * <ol>
+ *   <li> Emit Notifications</li>
+ *   <li> Provide the implementation of RPCs </li>
+ *   <li> Write to the operational data tree </li>
+ * </ol>
+ *
+ * <p>
+ * Consider using a BindingAwareProvider
+ *
+ * <p>
+ * Examples:
+ *
+ * <p>
+ * To get a NotificationService:
+ *
+ * <p>
+ * {code
+ * public void onSessionInitiated(ProviderContext session) {
+ *      NotificationProviderService notificationService = session.getSALService(NotificationProviderService.class);
+ *      notificationService.publish(notification)
+ * }
+ * where notification is an instance of a modeled Notification.
+ * For more information on sending notifications via the NotificationProviderService
+ * see org.opendaylight.controller.sal.binding.api.NotificationProviderService
+ *
+ * <p>
+ * A consumer can *invoke* and RPC ( ie, call foo(fooArgs)) but it cannot register an RPC
+ * implementation with the MD-SAL that others can invoke(call).
+ * To get an invokable RPC:
+ *
+ * <p>
+ * {code
+ * public void onSessionInitiated(ProviderContext session) {
+ *    MyService rpcFlowSalService = session.getRpcService(MyService.class);
+ * }
+ *
+ * <p>
+ * Where MyService.class is a Service interface generated from a yang model with RPCs modeled in it.  The returned
+ * rpcFlowSalService can be used like any other object by invoking its methods.  Note, nothing special needs to be done
+ * for RoutedRPCs.  They just work.
+ *
+ * <p>
+ * To get a DataBroker to allow access to the data tree:
+ *
+ * <p>
+ * {code
+ * public void onSessionInitiated(final ProviderContext session) {
+ *      DataBroker databroker = session.getSALService(BindingDataBroker.class);
+ * }
+ * }
 */
 public interface BindingAwareConsumer {
 
     /**
      * Callback signaling initialization of the consumer session to the SAL.
      *
 */
 public interface BindingAwareConsumer {
 
     /**
      * Callback signaling initialization of the consumer session to the SAL.
      *
+     * <p>
      * The consumer MUST use the session for all communication with SAL or
      * retrieving SAL infrastructure services.
      *
      * The consumer MUST use the session for all communication with SAL or
      * retrieving SAL infrastructure services.
      *
-     * This method is invoked by
-     * {@link BindingAwareBroker#registerConsumer(BindingAwareConsumer)}
+     * <p>
+     * This method is invoked by {@link BindingAwareBroker#registerConsumer(BindingAwareConsumer)}
      *
      * @param session
      *            Unique session between consumer and SAL.
      */
     void onSessionInitialized(ConsumerContext session);
      *
      * @param session
      *            Unique session between consumer and SAL.
      */
     void onSessionInitialized(ConsumerContext session);
-
 }
 }
index 808863262dde665b4b5defcede286d36aff70c62..699fd9171e97a5f67123e9e79f6f96f2c9b93d15 100644 (file)
@@ -10,9 +10,9 @@ package org.opendaylight.controller.sal.binding.api;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 
 /**
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 
 /**
- *
  * A developer implemented component that gets registered with the Broker.
  *
  * A developer implemented component that gets registered with the Broker.
  *
+ * <p>
  * Semantically, a provider may:
  *
  * <ol>
  * Semantically, a provider may:
  *
  * <ol>
@@ -21,14 +21,13 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderCo
  *   <li> Write to the operational data tree </li>
  * </ol>
  *
  *   <li> Write to the operational data tree </li>
  * </ol>
  *
+ * <p>
  * If a class is not doing at least one of those three, consider using
  * a BindingAwareConsumer instead:
  * If a class is not doing at least one of those three, consider using
  * a BindingAwareConsumer instead:
- * @see org.opendaylight.controller.sal.binding.api.BindingAwareConsumer
+ * see {@link org.opendaylight.controller.sal.binding.api.BindingAwareConsumer}
  *
  * <p>
  *
  * <p>
- *
- *In addition, a BindingAwareProvider can in pursuit of its goals:
- *
+ * In addition, a BindingAwareProvider can in pursuit of its goals:
  * <ol>
  *   <li>Subscribe for Notifications </li>
  *   <li>Invoke RPCs</li>
  * <ol>
  *   <li>Subscribe for Notifications </li>
  *   <li>Invoke RPCs</li>
@@ -37,12 +36,10 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderCo
  * </ol>
  * (All of the above are things a Consumer can also do).
  *
  * </ol>
  * (All of the above are things a Consumer can also do).
  *
- *<p>
- *
+ * <p>
  * Examples:
  *
  *<p>
  * Examples:
  *
  *<p>
- *
  * To get a NotificationService:
  *
  * {@code
  * To get a NotificationService:
  *
  * {@code
@@ -51,8 +48,9 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderCo
  * }
  * }
  * For more information on sending notifications via the NotificationProviderService
  * }
  * }
  * For more information on sending notifications via the NotificationProviderService
- * @see org.opendaylight.controller.sal.binding.api.NotificationProviderService
+ * see {@link org.opendaylight.controller.sal.binding.api.NotificationProviderService}
  *
  *
+ * <p>
  * To register an RPC implementation:
  *
  * {@code
  * To register an RPC implementation:
  *
  * {@code
@@ -62,35 +60,41 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderCo
  * }
  *
  * <p>
  * }
  *
  * <p>
- * Where MyService.class is a Service interface generated from a yang model with RPCs modeled in it and myImplementationInstance
- * is an instance of a class that implements MyService.
+ * Where MyService.class is a Service interface generated from a yang model with RPCs modeled in it and
+ * myImplementationInstance is an instance of a class that implements MyService.
  *
  *
+ * <p>
  * To register a Routed RPC Implementation:
  * {@code
  * public void onSessionInitiated(ProviderContext session) {
  * To register a Routed RPC Implementation:
  * {@code
  * public void onSessionInitiated(ProviderContext session) {
- *   RoutedRpcRegistration<SalFlowService> flowRegistration = session.addRoutedRpcImplementation(SalFlowService.class, salFlowServiceImplementationInstance);
+ *   RoutedRpcRegistration<SalFlowService> flowRegistration = session.addRoutedRpcImplementation(SalFlowService.class,
+ *       salFlowServiceImplementationInstance);
      flowRegistration.registerPath(NodeContext.class, nodeInstanceId);
  * }
  * }
  *
      flowRegistration.registerPath(NodeContext.class, nodeInstanceId);
  * }
  * }
  *
- * Where SalFlowService.class is a Service interface generated from a yang model with RPCs modeled in it and salFlowServiceImplementationInstance is an instance
- * of a class that implements SalFlowService.
+ * <p>
+ * Where SalFlowService.class is a Service interface generated from a yang model with RPCs modeled in it and
+ * salFlowServiceImplementationInstance is an instance of a class that implements SalFlowService.
+ *
  * <p>
  * The line:
  * {@code
  * flowRegistration.registerPath(NodeContext.class, nodeInstanceId);
  * }
  * <p>
  * The line:
  * {@code
  * flowRegistration.registerPath(NodeContext.class, nodeInstanceId);
  * }
- * Is indicating that the RPC implementation is registered to handle RPC invocations that have their NodeContext pointing to the node with instance id nodeInstanceId.
- * This bears a bit of further explanation.  RoutedRPCs can be 'routed' to an implementation based upon 'context'.  'context' is a pointer (instanceId) to some place
- * in the data tree.  In this example, the 'context' is a pointer to a Node.  In this way, a provider can register its ability to provide a service for a particular
- * Node, but not *all* Nodes.  The Broker routes the RPC by 'context' to the correct implementation, without the caller having to do extra work.  Because of this when
- * a RoutedRPC is registered, it needs to also be able to indicate for which 'contexts' it is providing an implementation.
+ * Is indicating that the RPC implementation is registered to handle RPC invocations that have their NodeContext
+ * pointing to the node with instance id nodeInstanceId. This bears a bit of further explanation.  RoutedRPCs can be
+ * 'routed' to an implementation based upon 'context'.  'context' is a pointer (instanceId) to some place in the data
+ * tree.  In this example, the 'context' is a pointer to a Node.  In this way, a provider can register its ability to
+ * provide a service for a particular Node, but not *all* Nodes.  The Broker routes the RPC by 'context' to the correct
+ * implementation, without the caller having to do extra work.  Because of this when a RoutedRPC is registered, it
+ * needs to also be able to indicate for which 'contexts' it is providing an implementation.
  *
  *
- * An example of a Routed RPC would be an updateFlow(node, flow) that would be routed based on node to the provider which had registered to provide
- * it *for that node*.
+ * <p>
+ * An example of a Routed RPC would be an updateFlow(node, flow) that would be routed based on node to the provider
+ * which had registered to provide it *for that node*.
  *
  *<p>
  *
  *<p>
- *
  * To get a DataBroker to allow access to the data tree:
  *
  * {@code
  * To get a DataBroker to allow access to the data tree:
  *
  * {@code
@@ -104,9 +108,11 @@ public interface BindingAwareProvider {
     /**
      * Callback signaling initialization of the consumer session to the SAL.
      *
     /**
      * Callback signaling initialization of the consumer session to the SAL.
      *
+     * <p>
      * The consumer MUST use the session for all communication with SAL or
      * retrieving SAL infrastructure services.
      *
      * The consumer MUST use the session for all communication with SAL or
      * retrieving SAL infrastructure services.
      *
+     * <p>
      * This method is invoked by
      * {@link BindingAwareBroker#registerProvider(BindingAwareProvider)}
      *
      * This method is invoked by
      * {@link BindingAwareBroker#registerProvider(BindingAwareProvider)}
      *
index adaa27f3e62b9551ccf4cd37fc651ccd7966950a..61714b1b9b7e7cfc6abdd63f3158e3758bb2fe0b 100644 (file)
@@ -17,13 +17,13 @@ package org.opendaylight.controller.sal.binding.api;
  * instance of the service with it's own context.
  *
  * <p>
  * instance of the service with it's own context.
  *
  * <p>
- * The consumer's (or provider's) instance of specific service could be obtained
- * by invoking {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext#getSALService(Class)} method on session
- * assigned to the consumer.
+ * The consumer's (or provider's) instance of specific service could be obtained by invoking
+ * {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext#getSALService(Class)}
+ * method on session assigned to the consumer.
  *
  * <p>
  *
  * <p>
- * {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext} and {@link BindingAwareProvider} may seem
- * similar, but provider provides YANG model-based functionality and
+ * {@link org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext}
+ * and {@link BindingAwareProvider} may seem similar, but provider provides YANG model-based functionality and
  * {@link BindingAwareProvider} exposes the necessary supporting functionality
  * to implement specific functionality of YANG and to reuse it in the
  * development of {@link BindingAwareConsumer}s and {@link BindingAwareProvider}s.
  * {@link BindingAwareProvider} exposes the necessary supporting functionality
  * to implement specific functionality of YANG and to reuse it in the
  * development of {@link BindingAwareConsumer}s and {@link BindingAwareProvider}s.
index e5a0a2bd6dda74aa8565757f2acea4679bbb1300..dbe6937b0d4d057fe554c2cfc341e58a2dc68ef6 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.yangtools.yang.binding.Notification;
 public interface NotificationListener<T extends Notification> extends EventListener {
     /**
      * Invoked to deliver a notification.
 public interface NotificationListener<T extends Notification> extends EventListener {
     /**
      * Invoked to deliver a notification.
+     *
      * <p>
      * Note that this method may be invoked from a shared thread pool, so implementations SHOULD NOT
      * perform CPU-intensive operations and MUST NOT invoke any potentially blocking operations.
      * <p>
      * Note that this method may be invoked from a shared thread pool, so implementations SHOULD NOT
      * perform CPU-intensive operations and MUST NOT invoke any potentially blocking operations.
index 073f98a91f1f74459a4c1cde93bacb04d21462c2..0f183a0e8cde37e0a67f4f93a18db80e0a65862f 100644 (file)
@@ -23,15 +23,9 @@ import org.opendaylight.yangtools.yang.binding.Notification;
 @Deprecated
 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
 
 @Deprecated
 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     void publish(Notification notification);
 
     @Override
     void publish(Notification notification);
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     void publish(Notification notification, ExecutorService executor);
 
     @Override
     void publish(Notification notification, ExecutorService executor);
 
@@ -39,6 +33,7 @@ public interface NotificationProviderService extends NotificationService, Notifi
      * Registers a listener to be notified about notification subscriptions. This
      * enables a component to know when there is a notification listener subscribed
      * for a particular notification type.
      * Registers a listener to be notified about notification subscriptions. This
      * enables a component to know when there is a notification listener subscribed
      * for a particular notification type.
+     *
      * <p>
      * On registration of this listener, the
      * {@link NotificationInterestListener#onNotificationSubscribtion(Class)} method
      * <p>
      * On registration of this listener, the
      * {@link NotificationInterestListener#onNotificationSubscribtion(Class)} method
@@ -59,12 +54,13 @@ public interface NotificationProviderService extends NotificationService, Notifi
     interface NotificationInterestListener extends EventListener {
 
         /**
     interface NotificationInterestListener extends EventListener {
 
         /**
-         * Callback that is invoked when a notification listener subscribes for a
-         * particular notification type.
+         * Callback that is invoked when a notification listener subscribes for a particular notification type.
+         *
          * <p>
          * This method is only called for the first subscription that occurs for a
          * particular notification type. Subsequent subscriptions for the same
          * notification type do not trigger invocation of this method.
          * <p>
          * This method is only called for the first subscription that occurs for a
          * particular notification type. Subsequent subscriptions for the same
          * notification type do not trigger invocation of this method.
+         *
          * <p>
          * <b>Note:</b>This callback is delivered from thread not owned by this listener,
          * all processing should be as fast as possible and implementations should
          * <p>
          * <b>Note:</b>This callback is delivered from thread not owned by this listener,
          * all processing should be as fast as possible and implementations should
index 015988e3d951327a519a4474afc5bfe7be48ebfa..8f3e1470e48e6c6a109781081193b3d35fd3f01f 100644 (file)
@@ -23,13 +23,16 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  * </ul>
  *
  * <h3>Generic Listener</h3>
  * </ul>
  *
  * <h3>Generic Listener</h3>
+ *
  * <p>
  * A generic listener implements the {@link NotificationListener} interface which has one callback method
  * <code>onNotification</code> that is invoked for any notification type the listener is subscribed to.
  * <p>
  * A generic listener implements the {@link NotificationListener} interface which has one callback method
  * <code>onNotification</code> that is invoked for any notification type the listener is subscribed to.
+ *
  * <p>
  * A generic listener is subscribed using the {@link #registerNotificationListener(Class, NotificationListener)}
  * method by which you specify the type of notification to receive. A generic listener may be registered for
  * multiple notification types via multiple subscriptions.
  * <p>
  * A generic listener is subscribed using the {@link #registerNotificationListener(Class, NotificationListener)}
  * method by which you specify the type of notification to receive. A generic listener may be registered for
  * multiple notification types via multiple subscriptions.
+ *
  * <p>
  * Generic listeners allow for a more flexible approach, allowing you to subscribe for just
  * one type of notification from a YANG model. You could also have a general subscription
  * <p>
  * Generic listeners allow for a more flexible approach, allowing you to subscribe for just
  * one type of notification from a YANG model. You could also have a general subscription
@@ -39,16 +42,18 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  * </pre>
  *
  * <h3>Dispatch Listener</h3>
  * </pre>
  *
  * <h3>Dispatch Listener</h3>
+ *
  * <p>
  * A dispatch listener implements a YANG-generated module interface <code>{ModuleName}Listener</code>
  * which handles all the notifications defined in the YANG model. Each notification type translates to
  * a specific method of the form <code>on{NotificationType}</code> on the generated interface.
  * The generated interface also extends the
  * {@link org.opendaylight.yangtools.yang.binding.NotificationListener} interface and implementations
  * <p>
  * A dispatch listener implements a YANG-generated module interface <code>{ModuleName}Listener</code>
  * which handles all the notifications defined in the YANG model. Each notification type translates to
  * a specific method of the form <code>on{NotificationType}</code> on the generated interface.
  * The generated interface also extends the
  * {@link org.opendaylight.yangtools.yang.binding.NotificationListener} interface and implementations
- * are registered using {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)}
- * method.
+ * are registered using
+ * {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)} method.
  *
  * <h4>Dispatch Listener Example</h4>
  *
  * <h4>Dispatch Listener Example</h4>
+ *
  * <p>
  * Lets assume we have following YANG model:
  *
  * <p>
  * Lets assume we have following YANG model:
  *
@@ -66,6 +71,7 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  * }
  * }
  *
  * }
  * }
  *
+ * <p>
  * The generated interface will be:
  * {@code
  *  public interface ExampleListener extends NotificationListener {
  * The generated interface will be:
  * {@code
  *  public interface ExampleListener extends NotificationListener {
index d31a2fe3277694db6baf2a551ce5e3584670c399..3967ff1c4421fbd77386199d956c81119f70ce94 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
 /**
  * Provides access to registered Remote Procedure Call (RPC) service implementations. The RPCs are
  * defined in YANG models.
 /**
  * Provides access to registered Remote Procedure Call (RPC) service implementations. The RPCs are
  * defined in YANG models.
+ *
  * <p>
  * RPC implementations are registered using the {@link RpcProviderRegistry}.
  *
  * <p>
  * RPC implementations are registered using the {@link RpcProviderRegistry}.
  *
@@ -45,24 +46,24 @@ public interface RpcConsumerRegistry extends BindingAwareService, BindingService
      * RPC methods may be implemented asynchronously, callers should avoid blocking on the
      * {@link java.util.concurrent.Future Future} result. Instead, it is recommended to use
      * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future)}
      * RPC methods may be implemented asynchronously, callers should avoid blocking on the
      * {@link java.util.concurrent.Future Future} result. Instead, it is recommended to use
      * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future)}
-     * or {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future, java.util.concurrent.Executor)}
+     * or {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future,
+     *     java.util.concurrent.Executor)}
      * to listen for Rpc Result. This will asynchronously listen for future result in executor and
      * will not block current thread.
      *
      * {@code
      *   final Future<RpcResult<SomeRpcOutput>> future = someRpcService.someRpc( ... );
      * to listen for Rpc Result. This will asynchronously listen for future result in executor and
      * will not block current thread.
      *
      * {@code
      *   final Future<RpcResult<SomeRpcOutput>> future = someRpcService.someRpc( ... );
-     *   Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), new FutureCallback<RpcResult<SomeRpcOutput>>() {
-     *
-     *       public void onSuccess(RpcResult<SomeRpcOutput> result) {
-     *          // process result ...
-     *       }
+     *   Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future),
+     *       new FutureCallback<RpcResult<SomeRpcOutput>>() {
+     *           public void onSuccess(RpcResult<SomeRpcOutput> result) {
+     *               // process result ...
+     *           }
      *
      *
-     *       public void onFailure(Throwable t) {
-     *          // RPC failed
-     *       }
-     *   );
-     * }
-     * }
+     *           public void onFailure(Throwable t) {
+     *              // RPC failed
+     *           }
+     *       });
+     *  }
      *
      * @param serviceInterface the interface of the RPC Service. Typically this is an interface generated
      *                         from a YANG model.
      *
      * @param serviceInterface the interface of the RPC Service. Typically this is an interface generated
      *                         from a YANG model.
index 759dbe01a7f235a549ecfb515c3dfe1c2ced2576..268906f450099fe6aca6f0269840b50ab616230a 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
 /**
  * Provides a registry for Remote Procedure Call (RPC) service implementations. The RPCs are
  * defined in YANG models.
 /**
  * Provides a registry for Remote Procedure Call (RPC) service implementations. The RPCs are
  * defined in YANG models.
+ *
  * <p>
  * There are 2 types of RPCs:
  * <ul>
  * <p>
  * There are 2 types of RPCs:
  * <ul>
@@ -25,18 +26,22 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * </ul>
  *
  * <h2>Global RPC</h2>
  * </ul>
  *
  * <h2>Global RPC</h2>
+ *
  * <p>
  * An RPC is global if there is intended to be only 1 registered implementation. A global RPC is not
  * explicitly declared as such, essentially any RPC that is not defined to be routed is considered global.
  * <p>
  * An RPC is global if there is intended to be only 1 registered implementation. A global RPC is not
  * explicitly declared as such, essentially any RPC that is not defined to be routed is considered global.
+ *
  * <p>
  * Global RPCs are registered using the
  * {@link #addRpcImplementation(Class, RpcService)} method.
  *
  * <h2>Routed RPC</h2>
  * <p>
  * Global RPCs are registered using the
  * {@link #addRpcImplementation(Class, RpcService)} method.
  *
  * <h2>Routed RPC</h2>
+ *
  * <p>
  * MD-SAL supports routing of RPC between multiple implementations where the appropriate
  * implementation is selected at run time based on the content of the RPC message as described in
  * YANG model.
  * <p>
  * MD-SAL supports routing of RPC between multiple implementations where the appropriate
  * implementation is selected at run time based on the content of the RPC message as described in
  * YANG model.
+ *
  * <p>
  * RPC routing is based on:
  * <ul>
  * <p>
  * RPC routing is based on:
  * <ul>
@@ -49,6 +54,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * </ul>
  *
  * <h3>Context type</h3>
  * </ul>
  *
  * <h3>Context type</h3>
+ *
  * <p>
  * A context type is modeled in YANG using a combination of a YANG <code>identity</code>
  * and Opendaylight specific extensions from <code>yang-ext</code> module. These extensions are:
  * <p>
  * A context type is modeled in YANG using a combination of a YANG <code>identity</code>
  * and Opendaylight specific extensions from <code>yang-ext</code> module. These extensions are:
@@ -65,10 +71,9 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * <code>instance-identifier</code> or a type derived from <code>instance-identifier</code>.</li>
  * </ul>
  *
  * <code>instance-identifier</code> or a type derived from <code>instance-identifier</code>.</li>
  * </ul>
  *
- *
- * <h3>Routed RPC example</h3>
- * <p>
+ * <p><br>
  * <h4>1. Defining a Context Type</h4>
  * <h4>1. Defining a Context Type</h4>
+ *
  * <p>
  * The following snippet declares a simple YANG <code>identity</code> named <code>example-context</code>:
  *
  * <p>
  * The following snippet declares a simple YANG <code>identity</code> named <code>example-context</code>:
  *
@@ -81,11 +86,13 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  *     ...
  * }
  * }
  *     ...
  * }
  * }
+ *
  * <p>
  * We then use the declared identity to define a context type by using it in combination
  * with the <code>context-instance</code> YANG extension. We'll associate the context type
  * with a list element in the data tree. This defines the set of nodes whose instance
  * identifiers are valid for the <code>example-context</code> context type.
  * <p>
  * We then use the declared identity to define a context type by using it in combination
  * with the <code>context-instance</code> YANG extension. We'll associate the context type
  * with a list element in the data tree. This defines the set of nodes whose instance
  * identifiers are valid for the <code>example-context</code> context type.
+ *
  * <p>
  * The following YANG snippet imports the <code>yang-ext</code> module and defines the list
  * element named <code>item</code> inside a container named <code>foo</code>:
  * <p>
  * The following YANG snippet imports the <code>yang-ext</code> module and defines the list
  * element named <code>item</code> inside a container named <code>foo</code>:
@@ -105,6 +112,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  *     ...
  * }
  * }
  *     ...
  * }
  * }
+ *
  * <p>
  * The statement <code>ext:context-instance "example-context";</code> inside the list element
  * declares that any instance identifier referencing <code>item</code> in the data
  * <p>
  * The statement <code>ext:context-instance "example-context";</code> inside the list element
  * declares that any instance identifier referencing <code>item</code> in the data
@@ -118,15 +126,19 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  *     InstanceIdentifier.create(Example.class)
  * </pre>
  * is not valid.
  *     InstanceIdentifier.create(Example.class)
  * </pre>
  * is not valid.
+ *
  * <p>
  * So using an <code>identity</code> in combination with <code>context-instance</code> we
  * have effectively defined a context type that can be referenced in a YANG RPC input.
  *
  * <p>
  * So using an <code>identity</code> in combination with <code>context-instance</code> we
  * have effectively defined a context type that can be referenced in a YANG RPC input.
  *
+ * <p>
  * <h5>2. Defining an RPC to use the Context Type</h5>
  * <h5>2. Defining an RPC to use the Context Type</h5>
+ *
  * <p>
  * To define an RPC to be routed based on the context type we need to add an input leaf element
  * that references the context type which will hold an instance identifier value to be
  * used to route the RPC.
  * <p>
  * To define an RPC to be routed based on the context type we need to add an input leaf element
  * that references the context type which will hold an instance identifier value to be
  * used to route the RPC.
+ *
  * <p>
  * The following snippet defines an RPC named <code>show-item</code> with 2 leaf elements
  * as input: <code>item</code> of type <code>instance-identifier</code> and <code>description</code>:
  * <p>
  * The following snippet defines an RPC named <code>show-item</code> with 2 leaf elements
  * as input: <code>item</code> of type <code>instance-identifier</code> and <code>description</code>:
@@ -149,11 +161,13 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  *      }
  * }
  * </pre>
  *      }
  * }
  * </pre>
+ *
  * <p>
  * We mark the <code>item</code> leaf with a <code>context-reference</code> statement that
  * references the <code>example-context</code> context type. RPC calls will then be routed
  * based on the instance identifier value contained in <code>item</code>. Only instance
  * identifiers that point to a <code>foo/item</code> node are valid as input.
  * <p>
  * We mark the <code>item</code> leaf with a <code>context-reference</code> statement that
  * references the <code>example-context</code> context type. RPC calls will then be routed
  * based on the instance identifier value contained in <code>item</code>. Only instance
  * identifiers that point to a <code>foo/item</code> node are valid as input.
+ *
  * <p>
  * The generated RPC Service interface for the module is:
  *
  * <p>
  * The generated RPC Service interface for the module is:
  *
@@ -162,15 +176,18 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  *      Future&lt;RpcResult&lt;Void&gt;&gt; showItem(ShowItemInput input);
  * }
  * </pre>
  *      Future&lt;RpcResult&lt;Void&gt;&gt; showItem(ShowItemInput input);
  * }
  * </pre>
+ *
  * <p>
  * For constructing the RPC input, there are generated classes ShowItemInput and ShowItemInputBuilder.
  *
  * <h5>3. Registering a routed RPC implementation</h5>
  * <p>
  * For constructing the RPC input, there are generated classes ShowItemInput and ShowItemInputBuilder.
  *
  * <h5>3. Registering a routed RPC implementation</h5>
+ *
  * <p>
  * To register a routed implementation for the <code>show-item</code> RPC, we must use the
  * {@link #addRoutedRpcImplementation(Class, RpcService)} method. This
  * will return a {@link RoutedRpcRegistration} instance which can then be used to register /
  * unregister routed paths associated with the registered implementation.
  * <p>
  * To register a routed implementation for the <code>show-item</code> RPC, we must use the
  * {@link #addRoutedRpcImplementation(Class, RpcService)} method. This
  * will return a {@link RoutedRpcRegistration} instance which can then be used to register /
  * unregister routed paths associated with the registered implementation.
+ *
  * <p>
  * The following snippet registers <code>myImpl</code> as the RPC implementation for an
  * <code>item</code> with key <code>"foo"</code>:
  * <p>
  * The following snippet registers <code>myImpl</code> as the RPC implementation for an
  * <code>item</code> with key <code>"foo"</code>:
@@ -185,6 +202,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * // YANG-generated class for the example-context identity.
  * reg.registerPath(ExampleContext.class, path);
  * </pre>
  * // YANG-generated class for the example-context identity.
  * reg.registerPath(ExampleContext.class, path);
  * </pre>
+ *
  * <p>
  * It is also possible to register the same implementation for multiple paths:
  *
  * <p>
  * It is also possible to register the same implementation for multiple paths:
  *
@@ -203,13 +221,18 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * arguments in ShowItemInput, extract the InstanceIdentifier value of the <code>item</code> leaf and select
  * the implementation whose registered path matches the InstanceIdentifier value of the <code>item</code> leaf.
  *
  * arguments in ShowItemInput, extract the InstanceIdentifier value of the <code>item</code> leaf and select
  * the implementation whose registered path matches the InstanceIdentifier value of the <code>item</code> leaf.
  *
+ * <p><br>
  * <h2>Notes for RPC Implementations</h2>
  *
  * <h2>Notes for RPC Implementations</h2>
  *
+ * <p>
  * <h3>RpcResult</h3>
  * <h3>RpcResult</h3>
+ *
  * <p>
  * The generated interfaces require implementors to return
  * <p>
  * The generated interfaces require implementors to return
- *  {@link java.util.concurrent.Future Future}&lt;{@link org.opendaylight.yangtools.yang.common.RpcResult RpcResult}&lt;{RpcName}Output&gt;&gt; instances.
+ *  {@link java.util.concurrent.Future Future}&lt;{@link org.opendaylight.yangtools.yang.common.RpcResult RpcResult}
+ *  &lt;{RpcName}Output&gt;&gt; instances.
  *
  *
+ * <p>
  * Implementations should do processing of RPC calls asynchronously and update the
  * returned {@link java.util.concurrent.Future Future} instance when processing is complete.
  * However using {@link com.google.common.util.concurrent.Futures#immediateFuture(Object) Futures.immediateFuture}
  * Implementations should do processing of RPC calls asynchronously and update the
  * returned {@link java.util.concurrent.Future Future} instance when processing is complete.
  * However using {@link com.google.common.util.concurrent.Futures#immediateFuture(Object) Futures.immediateFuture}
@@ -223,6 +246,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * or completely fail. This is intended to provide additional human readable information
  * for users of the API and to transfer warning / error information across the system
  * so it may be visible via other external APIs such as Restconf.
  * or completely fail. This is intended to provide additional human readable information
  * for users of the API and to transfer warning / error information across the system
  * so it may be visible via other external APIs such as Restconf.
+ *
  * <p>
  * It is recommended to use the {@link org.opendaylight.yangtools.yang.common.RpcResult RpcResult}
  * for conveying appropriate error information
  * <p>
  * It is recommended to use the {@link org.opendaylight.yangtools.yang.common.RpcResult RpcResult}
  * for conveying appropriate error information
index b4bd6eb6a7782af3aeeb98aec5f88aad3256b232..3bdb432eb88d64ca869694af042c6f8fe5443ad6 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
-public final  class RpcContextIdentifier implements Immutable{
+public final  class RpcContextIdentifier implements Immutable {
 
     public final Class<? extends RpcService> rpcService;
     public final Class<? extends BaseIdentity> routingContext;
 
     public final Class<? extends RpcService> rpcService;
     public final Class<? extends BaseIdentity> routingContext;
@@ -29,11 +29,12 @@ public final  class RpcContextIdentifier implements Immutable{
         return routingContext;
     }
 
         return routingContext;
     }
 
-    public static final RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
+    public static RpcContextIdentifier contextForGlobalRpc(Class<? extends RpcService> serviceType) {
         return new RpcContextIdentifier(serviceType, null);
     }
 
         return new RpcContextIdentifier(serviceType, null);
     }
 
-    public static final RpcContextIdentifier contextFor(Class<? extends RpcService> serviceType,Class<? extends BaseIdentity> routingContext) {
+    public static RpcContextIdentifier contextFor(Class<? extends RpcService> serviceType,
+            Class<? extends BaseIdentity> routingContext) {
         return new RpcContextIdentifier(serviceType, routingContext);
     }
 
         return new RpcContextIdentifier(serviceType, routingContext);
     }
 
@@ -41,31 +42,37 @@ public final  class RpcContextIdentifier implements Immutable{
     public int hashCode() {
         final int prime = 31;
         int result = 1;
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((routingContext == null) ? 0 : routingContext.hashCode());
-        result = prime * result + ((rpcService == null) ? 0 : rpcService.hashCode());
+        result = prime * result + (routingContext == null ? 0 : routingContext.hashCode());
+        result = prime * result + (rpcService == null ? 0 : rpcService.hashCode());
         return result;
     }
 
     @Override
     public boolean equals(Object obj) {
         return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
             return false;
+        }
         RpcContextIdentifier other = (RpcContextIdentifier) obj;
         if (routingContext == null) {
         RpcContextIdentifier other = (RpcContextIdentifier) obj;
         if (routingContext == null) {
-            if (other.routingContext != null)
+            if (other.routingContext != null) {
                 return false;
                 return false;
-        } else if (!routingContext.equals(other.routingContext))
+            }
+        } else if (!routingContext.equals(other.routingContext)) {
             return false;
             return false;
+        }
         if (rpcService == null) {
         if (rpcService == null) {
-            if (other.rpcService != null)
+            if (other.rpcService != null) {
                 return false;
                 return false;
-        } else if (!rpcService.equals(other.rpcService))
+            }
+        } else if (!rpcService.equals(other.rpcService)) {
             return false;
             return false;
+        }
         return true;
     }
         return true;
     }
-
 }
 }
index a886692e8cbb0c64064001f1df0c9a03a459e826..4d42ff2bfc057ce53fd40cc38820eb3ac6d024f6 100644 (file)
@@ -13,5 +13,6 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
 public interface RpcRoutingContext<C extends BaseIdentity,S extends RpcService> {
 
     Class<C> getContextType();
 public interface RpcRoutingContext<C extends BaseIdentity,S extends RpcService> {
 
     Class<C> getContextType();
+
     Class<S> getServiceType();
 }
     Class<S> getServiceType();
 }