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=7d364958d871519a2b888d3d23d05e1e3a0de3f2;hb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0;hp=bcbd6879d037d12a27c2781ab46f02887c571dff;hpb=17d82f582a6bc13c78be3b19954ff8c021180e93;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 bcbd6879d0..7d364958d8 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,78 +10,84 @@ package org.opendaylight.controller.sal.binding.api; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext; /** -* -* A developer implemented component that gets registered with the Broker. -* -* Semantically, a consumer may: -* -*
    -*
  1. Subscribe for Notifications
  2. -*
  3. Invoke RPCs
  4. -*
  5. Read from either the operational or config data tree
  6. -*
  7. Write to the config data tree
  8. -*
-* If you need to: -*
    -*
  1. Emit Notifications
  2. -*
  3. Provide the implementation of RPCs
  4. -*
  5. Write to the operational data tree
  6. -*
-* -* 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. -* + * A developer implemented component that gets registered with the Broker. + * + *

+ * Semantically, a consumer may: + * + *

    + *
  1. Subscribe for Notifications
  2. + *
  3. Invoke RPCs
  4. + *
  5. Read from either the operational or config data tree
  6. + *
  7. Write to the config data tree
  8. + *
+ * If you need to: + *
    + *
  1. Emit Notifications
  2. + *
  3. Provide the implementation of RPCs
  4. + *
  5. Write to the operational data tree
  6. + *
+ * + *

+ * 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); + * } + * } */ +@Deprecated(forRemoval = true) public interface BindingAwareConsumer { /** * Callback signaling initialization of the consumer session to the SAL. * + *

* 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)} + *

+ * This method is invoked by {@link BindingAwareBroker#registerConsumer(BindingAwareConsumer)} * * @param session * Unique session between consumer and SAL. */ void onSessionInitialized(ConsumerContext session); - }