injecting the dependencies vs getting them from SAL registry

asked 2015-06-11 03:04:26 -0700

vikram_darsi gravatar image

updated 2015-06-11 03:08:53 -0700

HI

I am a opendaylight beginner and want to understand few things

what is the difference in getting the DataBroker injected by ConfigSubsystem(as explained in the below link by defining dependencies in YANG) and getting the DataBroker in “onSessionInitiated(ProviderContext pc)” of BindingAware component.

http://sdntutorials.com/switching-to-config-subsystem-aware-bundles-in-opendaylight-helium/#comment-22770

we can use below statement to get DataBroker

  1. pc.getSALService(DataBroker.class);

In the later approach, we do not need to define the dependencies in yang file, am I correct?

edit retag flag offensive close merge delete