Skip to content
Snippets Groups Projects
Commit ed5c4310 authored by Ananth Suryanarayana's avatar Ananth Suryanarayana
Browse files

minor cleanup

parent 7d74f94f
No related branches found
No related tags found
No related merge requests found
...@@ -14,11 +14,16 @@ import net.floodlightcontroller.restserver.IRestApiService; ...@@ -14,11 +14,16 @@ import net.floodlightcontroller.restserver.IRestApiService;
* @author alexreimers * @author alexreimers
*/ */
public class Main { public class Main {
private static IFloodlightModuleContext moduleContext; private static IFloodlightModuleContext staticModuleContext;
public static IFloodlightModuleContext floodlightContextGet () { public static IFloodlightModuleContext getFloodlightContext () {
return moduleContext; return staticModuleContext;
}
public static void setFloodlightContext (
IFloodlightModuleContext moduleContext) {
staticModuleContext = moduleContext;
} }
/** /**
...@@ -42,7 +47,10 @@ public class Main { ...@@ -42,7 +47,10 @@ public class Main {
// Load modules // Load modules
FloodlightModuleLoader fml = new FloodlightModuleLoader(); FloodlightModuleLoader fml = new FloodlightModuleLoader();
moduleContext = fml.loadModulesFromConfig(settings.getModuleFile()); IFloodlightModuleContext moduleContext =
fml.loadModulesFromConfig(settings.getModuleFile());
setFloodlightContext(moduleContext);
// Run REST server // Run REST server
IRestApiService restApi = moduleContext.getServiceImpl(IRestApiService.class); IRestApiService restApi = moduleContext.getServiceImpl(IRestApiService.class);
restApi.run(); restApi.run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment