X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FBindingAwareConsumer.java;h=bcbd6879d037d12a27c2781ab46f02887c571dff;hb=2727bea09c83646b6cbd2ef9672d0b7f6cf3b22f;hp=4327451d2126fa51b6a3a7767e0c2fbd0781703c;hpb=53aff7cd94da139a8329daddbcd773469564d1f4;p=controller.git
diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java
index 4327451d21..bcbd6879d0 100644
--- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java
+++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java
@@ -10,17 +10,64 @@ package org.opendaylight.controller.sal.binding.api;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
/**
- *
- * Defines the component of controller and supplies additional metadata. A
- * component of the controller or application supplies a concrete implementation
- * of this interface.
- *
- * A user-implemented component (application) which facilitates the SAL and SAL
- * services to access infrastructure services or providers' functionality.
- *
- *
- *
- */
+*
+* A developer implemented component that gets registered with the Broker.
+*
+* Semantically, a consumer may:
+*
+*
+* - Subscribe for Notifications
+* - Invoke RPCs
+* - Read from either the operational or config data tree
+* - Write to the config data tree
+*
+* If you need to:
+*
+* - Emit Notifications
+* - Provide the implementation of RPCs
+* - Write to the operational data tree
+*
+*
+* 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);
+* }
+* }
+* @see org.opendaylight.controller.md.sal.common.api.data.BindingDataBroker
+* for more info on using the DataBroker.
+*
+*/
public interface BindingAwareConsumer {
/**