| Constructor and Description |
|---|
OsgiServiceUtil(org.osgi.framework.BundleContext context) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getServiceImpl(java.lang.Class<T> contract)
Locate the single implementor of the given service contract in the given OSGi buindle context.
|
<T> T[] |
getServiceImpls(java.lang.Class<T> contract)
Locate all implementors of the given service contract in the given OSGi buindle context.
|
void |
stop()
Stop phase notification
|
public <T> T[] getServiceImpls(java.lang.Class<T> contract)
ServiceTracker (best practice, automatically handles a lot of boilerplate and error conditions).contract - The service contract for which to locate implementorscontext - The OSGi bundle contextT[] - The Java type of the service to locatepublic <T> T getServiceImpl(java.lang.Class<T> contract)
ServiceTracker.waitForService(long)contract - The service contract for which to locate implementorscontext - The OSGi bundle contextT[] - The Java type of the service to locateCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.