This application uses the Activator class to attach itself to OpenDaylight. This class creates an Activator class that is extended from org.OpenDaylight.controller.sal.core.ComponentActivatorAbstractBase.
As we discussed in previous chapters, OpenDaylight is based on Apache Karaf OSGi container. The NAC plugin is an OSGi component, and in order to implement this, we need two other class files:
- OSGi activator: This is to register the component with the OSGi framework.
- PacketHandler: This is the control logic to process the packets in the event of packet-in and when the packets are handed over to PacketHandler.
Lets have a closer look at the Activator.java source code :
01 package ca.inverse.odlpf; ...