124 | | Class `Controller`, Floodlight's core controller implementation, dispatches events to the modules by calling the modules' event handling functions such as ''receive()''. The controller keeps mappings of which modules implement which listener in two map structures, ''switchListeners'' and ''messageListeners''. These maps are used by the controller to dispatch the events to the proper listeners. `IFloodLightProviderService`, the interface that `Controller` implements, in turn provides two functions, ''addOFSwitchListener()'' and ''addOFMessageListener()'', which the modules can call in their initialization functions to add themselves to the appropriate map. The controller's listener maps are populated at startup, when the module loader initializes each required module. |
| 124 | Class `Controller`, Floodlight's core controller implementation, dispatches events to the modules by calling the modules' event handling functions, namely ''receive()''. The controller keeps mappings of which modules implement which listener in two map structures, ''switchListeners'' and ''messageListeners''. These maps are used by the controller to dispatch the events to the proper listeners. `IFloodLightProviderService`, the interface that `Controller` implements, in turn provides two functions, ''addOFSwitchListener()'' and ''addOFMessageListener()'', which the modules can call in their initialization functions to add themselves to the appropriate map. The controller's listener maps are populated at startup, when the module loader initializes each required module. |