| Constructor and Description |
|---|
OsgiServiceUtil(org.osgi.framework.BundleContext context) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getServiceImpl(Class<T> contract)
Locate the single implementor of the given service contract in the given OSGi buindle context.
|
<T> T[] |
getServiceImpls(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(Class<T> contract)
ServiceTracker (best practice, automatically handles a lot of boilerplate and error conditions).T - The Java type of the service to locatecontract - The service contract for which to locate implementorspublic <T> T getServiceImpl(Class<T> contract)
ServiceTracker.waitForService(long)T - The Java type of the service to locatecontract - The service contract for which to locate implementorsCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.