public class ServiceCache extends Object implements org.osgi.framework.ServiceListener
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ServiceCache.Reference |
| Modifier and Type | Field and Description |
|---|---|
protected List<org.osgi.framework.ServiceReference> |
references
The list of references - we don't need to synchronize this as we are
running in one single request.
|
| Constructor and Description |
|---|
ServiceCache(org.osgi.framework.BundleContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
<ServiceType> |
getService(Class<ServiceType> type)
Return a service for the given service class.
|
void |
serviceChanged(org.osgi.framework.ServiceEvent event) |
protected final List<org.osgi.framework.ServiceReference> references
public void dispose()
public <ServiceType> ServiceType getService(Class<ServiceType> type)
ServiceType - The service class / interfacetype - The requested servicenullpublic void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged in interface org.osgi.framework.ServiceListenerServiceListener.serviceChanged(org.osgi.framework.ServiceEvent)Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.