use of org.opendaylight.openflowplugin.learningswitch.WakeupOnNode in project openflowplugin by opendaylight.
the class LearningSwitchManagerMultiImpl method start.
/**
* Starts learning switch.
*/
@Override
public void start() {
LOG.debug("start() -->");
FlowCommitWrapper dataStoreAccessor = new FlowCommitWrapperImpl(data);
PacketInDispatcherImpl packetInDispatcher = new PacketInDispatcherImpl();
MultipleLearningSwitchHandlerFacadeImpl learningSwitchHandler = new MultipleLearningSwitchHandlerFacadeImpl(dataStoreAccessor, packetProcessingService, packetInDispatcher);
packetInRegistration = notificationService.registerNotificationListener(packetInDispatcher);
WakeupOnNode wakeupListener = new WakeupOnNode();
wakeupListener.setLearningSwitchHandler(learningSwitchHandler);
final InstanceIdentifier<Table> instanceIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class).child(Table.class);
final DataTreeIdentifier<Table> dataTreeIdentifier = new DataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
dataTreeChangeListenerRegistration = data.registerDataTreeChangeListener(dataTreeIdentifier, wakeupListener);
LOG.debug("start() <--");
}
Aggregations