tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.osgi; |
| 2 | |
| 3 | /** |
| 4 | * Simple abstraction of a service directory where service implementations can |
| 5 | * be found by the class name of the interfaces they provide. |
| 6 | */ |
| 7 | public interface ServiceDirectory { |
| 8 | |
| 9 | /** |
| 10 | * Returns implementation of the specified service class. |
| 11 | * @param serviceClass service class |
| 12 | * @param <T> type of service |
| 13 | * @return implementation class |
| 14 | * @throws ServiceNotFoundException if no implementation found |
| 15 | */ |
| 16 | <T> T get(Class<T> serviceClass); |
| 17 | |
| 18 | } |