public class OSGIServiceContext extends Object implements ServiceContext
Constructor and Description |
---|
OSGIServiceContext(org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getService(Class<T> serviceType)
Access a service singleton via its type.
|
<T> List<T> |
getServices(Class<T> serviceType)
Access a list current services, given its type.
|
boolean |
isInitialized() |
int |
ordinal() |
public OSGIServiceContext(org.osgi.framework.BundleContext bundleContext)
public boolean isInitialized()
public int ordinal()
ordinal
in interface ServiceContext
public <T> T getService(Class<T> serviceType)
ServiceContext
Priority
will be used.getService
in interface ServiceContext
T
- the type of the service type.serviceType
- the service type.null
public <T> List<T> getServices(Class<T> serviceType)
ServiceContext
getServices
in interface ServiceContext
T
- the type of the list element returned by this methodserviceType
- the service type.null
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.