public final class ServiceHelper extends Object
Constructor and Description |
---|
ServiceHelper() |
Modifier and Type | Method and Description |
---|---|
static Object |
getGlobalInstance(Class<?> clazz,
Object bundle)
Retrieve global instance of a class via OSGI registry, if
there are many only the first is returned.
|
static Object |
getGlobalInstance(Class<?> clazz,
Object bundle,
String serviceFilter)
Retrieve global instance of a class via OSGI registry, if
there are many only the first is returned.
|
static <T> void |
overrideGlobalInstance(Class<T> clazz,
T instance)
Override a global instance.
|
public static <T> void overrideGlobalInstance(Class<T> clazz, T instance)
clazz
- The target class.instance
- The instance to return for the class.public static Object getGlobalInstance(Class<?> clazz, Object bundle)
clazz
- The target classbundle
- The callerpublic static Object getGlobalInstance(Class<?> clazz, Object bundle, String serviceFilter)
clazz
- The target classbundle
- The callerserviceFilter
- LDAP filter to be applied in the searchCopyright © 2018 OpenDaylight. All rights reserved.