Reputation: 159
I'm new to Opendaylight and I'm currently trying to develop an app to get packet-in, analyse them and then dispatch them to other app. Does the blueprint replace the need for creating an Activator class to register the component with the OSGi framework? Or do we still need the activator to instantiate and set the dependencies? As far as I can tell, the blueprint already does that, am I correct?
Any help would be extremely appreciated!
Upvotes: 1
Views: 335
Reputation: 2881
Yes, Blueprint takes care of the OSGi registration and discovery for you, as long as you declare the appropriate elements in the Blueprint descriptor: <reference/>
to find a service, <service/>
to expose one. The Using Blueprint page on the ODL wiki covers Blueprint usage in some detail, including OSGi integration and MD-SAL integration.
In many cases, if you’re using the ODL parent POMs you can take advantage of Blueprint autowiring, using @Singleton
and @Inject
annotations instead of writing an XML file.
(You can ignore all the Config Sub-System sections, that’s deprecated.)
Upvotes: 1