Package org.onlab.osgi
Class DefaultServiceDirectory
- java.lang.Object
-
- org.onlab.osgi.DefaultServiceDirectory
-
- All Implemented Interfaces:
ServiceDirectory
public class DefaultServiceDirectory extends java.lang.Object implements ServiceDirectory
Default implementation of the service directory using OSGi framework utilities.
-
-
Constructor Summary
Constructors Constructor Description DefaultServiceDirectory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(java.lang.Class<T> serviceClass)
Returns implementation of the specified service class.static <T> T
getService(java.lang.Class<T> serviceClass)
Returns the reference to the implementation of the specified service.
-
-
-
Method Detail
-
getService
public static <T> T getService(java.lang.Class<T> serviceClass)
Returns the reference to the implementation of the specified service.- Type Parameters:
T
- type of service- Parameters:
serviceClass
- service class- Returns:
- service implementation
-
get
public <T> T get(java.lang.Class<T> serviceClass)
Description copied from interface:ServiceDirectory
Returns implementation of the specified service class.- Specified by:
get
in interfaceServiceDirectory
- Type Parameters:
T
- type of service- Parameters:
serviceClass
- service class- Returns:
- implementation class
-
-