// Load modules
FloodlightModuleLoader fml = new FloodlightModuleLoader();
IFloodlightModuleContext moduleContext = fml.loadModulesFromConfig(settings.getModuleFile());
// Run REST server
IRestApiService restApi = moduleContext.getServiceImpl(IRestApiService.class);
restApi.run();
// Run the main floodlight module
IFloodlightProviderService controller =
moduleContext.getServiceImpl(IFloodlightProviderService.class);
// This call blocks, it has to be the last line in the main
controller.run();