| 107 | === Startup === |
| 108 | The following steps describe the startup process of the Floodlight controller. The reference is the source code in Main.java. |
| 109 | 1. the !FloodlightModuleLoader reads in the list of modules, and loads them, returning an IFloodlightModuleContext instance. [[BR]] |
| 110 | The !FloodlightModuleLoader basically coordinates calls to the functions provided by the IFloodlightModule interface for each module in the config file (floodlightdefault.properties) and the modules that they depend on. Some key points are: [[BR]] |
| 111 | * IFloodlightModule is the interface that lets you define Floodlight module behavior in a uniform way. |
| 112 | * it finds all of the modules that it needs to load via a DFS beginning with the modules listed in the config file. The search is facilitated by IFloodlightModule functions. |
| 113 | * moduleSet will ultimately contain the minimum number of modules that need to be loaded at startup. |
| 114 | |
| 115 | 2. the IFloodlightModuleContext instance fetches copies of the IRestApiService and IFloodlightProviderService modules. [[BR]] |
| 116 | IFloodlightModuleContext provides a clean mechanism for retrieving references to the loaded modules/services, and their configuration parameters. FloodlightModuleContext implements this interface. [[BR]] |
| 117 | * IRestApiService provides REST API functions. |
| 118 | * IFloodlightProviderService provides the core controller functions and then some. |
| 119 | |
| 120 | 3. Run the REST API and core controller [[BR]] |
| 121 | At this point, Floodlight is up and running. |