blob: cdaadc30326d015c532ab6e4d0df8334b0e42ed7 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package net.floodlightcontroller.core.module;
2
3import java.util.Collection;
4import java.util.Map;
5
Ray Milkey269ffb92014-04-03 14:43:30 -07006
7public interface IFloodlightModuleContext {
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08008 /**
9 * Retrieves a casted version of a module from the registry.
Ray Milkey269ffb92014-04-03 14:43:30 -070010 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080011 * @param name The IFloodlightService object type
12 * @return The IFloodlightService
Ray Milkey269ffb92014-04-03 14:43:30 -070013 * @throws FloodlightModuleException If the module was not found
14 * or a ClassCastException was encountered.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080015 */
16 public <T extends IFloodlightService> T getServiceImpl(Class<T> service);
Ray Milkey269ffb92014-04-03 14:43:30 -070017
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080018 /**
19 * Returns all loaded services
Ray Milkey269ffb92014-04-03 14:43:30 -070020 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080021 * @return A collection of service classes that have been loaded
22 */
23 public Collection<Class<? extends IFloodlightService>> getAllServices();
Ray Milkey269ffb92014-04-03 14:43:30 -070024
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080025 /**
26 * Returns all loaded modules
Ray Milkey269ffb92014-04-03 14:43:30 -070027 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080028 * @return All Floodlight modules that are going to be loaded
29 */
30 public Collection<IFloodlightModule> getAllModules();
Ray Milkey269ffb92014-04-03 14:43:30 -070031
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080032 /**
33 * Gets module specific configuration parameters.
Ray Milkey269ffb92014-04-03 14:43:30 -070034 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080035 * @param module The module to get the configuration parameters for
36 * @return A key, value map of the configuration options
37 */
38 public Map<String, String> getConfigParams(IFloodlightModule module);
39}