Class LearningSwitchManagerSimpleImpl
- java.lang.Object
 - 
- org.opendaylight.openflowplugin.learningswitch.LearningSwitchManagerSimpleImpl
 
 
- 
- All Implemented Interfaces:
 DataTreeChangeListenerRegistrationHolder,LearningSwitchManager
public class LearningSwitchManagerSimpleImpl extends Object implements DataTreeChangeListenerRegistrationHolder, LearningSwitchManager
Listens to packetIn notification.- in HUB mode simply floods all switch ports (except ingress port)
 - in LSWITCH mode collects source MAC address of packetIn and bind it with ingress port. If target MAC address is already bound then a flow is created (for direct communication between corresponding MACs)
 
 
- 
- 
Constructor Summary
Constructors Constructor Description LearningSwitchManagerSimpleImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opendaylight.yangtools.concepts.ListenerRegistration<org.opendaylight.mdsal.binding.api.DataTreeChangeListener>getDataTreeChangeListenerRegistration()Returns the DataTreeChangeListenerRegistration.voidsetDataBroker(org.opendaylight.mdsal.binding.api.DataBroker broker)Sets the DataBroker.voidsetNotificationService(org.opendaylight.mdsal.binding.api.NotificationService notificationService)Sets the NotificationService.voidsetPacketProcessingService(PacketProcessingService packetProcessingService)Sets the PacketProcessingService.voidstart()Starts learning switch.voidstop()Stops the learning switch. 
 - 
 
- 
- 
Method Detail
- 
setNotificationService
public void setNotificationService(org.opendaylight.mdsal.binding.api.NotificationService notificationService)
Sets the NotificationService.- Specified by:
 setNotificationServicein interfaceLearningSwitchManager- Parameters:
 notificationService- the notificationService to set
 
- 
setPacketProcessingService
public void setPacketProcessingService(PacketProcessingService packetProcessingService)
Sets the PacketProcessingService.- Specified by:
 setPacketProcessingServicein interfaceLearningSwitchManager- Parameters:
 packetProcessingService- the packetProcessingService to set
 
- 
setDataBroker
public void setDataBroker(org.opendaylight.mdsal.binding.api.DataBroker broker)
Sets the DataBroker.- Specified by:
 setDataBrokerin interfaceLearningSwitchManager
 
- 
start
public void start()
Starts learning switch.- Specified by:
 startin interfaceLearningSwitchManager
 
- 
stop
public void stop()
Stops the learning switch.- Specified by:
 stopin interfaceLearningSwitchManager
 
- 
getDataTreeChangeListenerRegistration
public org.opendaylight.yangtools.concepts.ListenerRegistration<org.opendaylight.mdsal.binding.api.DataTreeChangeListener> getDataTreeChangeListenerRegistration()
Description copied from interface:DataTreeChangeListenerRegistrationHolderReturns the DataTreeChangeListenerRegistration.- Specified by:
 getDataTreeChangeListenerRegistrationin interfaceDataTreeChangeListenerRegistrationHolder
 
 - 
 
 -