Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.core.module; |
| 2 | |
| 3 | import java.util.Collection; |
| 4 | import java.util.Map; |
| 5 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 6 | |
| 7 | public interface IFloodlightModuleContext { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 8 | /** |
| 9 | * Retrieves a casted version of a module from the registry. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 10 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 11 | * @param name The IFloodlightService object type |
| 12 | * @return The IFloodlightService |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 13 | * @throws FloodlightModuleException If the module was not found |
| 14 | * or a ClassCastException was encountered. |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 15 | */ |
| 16 | public <T extends IFloodlightService> T getServiceImpl(Class<T> service); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 17 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 18 | /** |
| 19 | * Returns all loaded services |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 20 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 21 | * @return A collection of service classes that have been loaded |
| 22 | */ |
| 23 | public Collection<Class<? extends IFloodlightService>> getAllServices(); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 24 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 25 | /** |
| 26 | * Returns all loaded modules |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 27 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 28 | * @return All Floodlight modules that are going to be loaded |
| 29 | */ |
| 30 | public Collection<IFloodlightModule> getAllModules(); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 31 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 32 | /** |
| 33 | * Gets module specific configuration parameters. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 34 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 35 | * @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 | } |