org.apache.sling.scripting.core.impl
Class ServiceCache
java.lang.Object
org.apache.sling.scripting.core.impl.ServiceCache
- All Implemented Interfaces:
- EventListener, org.osgi.framework.ServiceListener
public class ServiceCache
- extends Object
- implements org.osgi.framework.ServiceListener
Field Summary |
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 Summary |
ServiceCache(org.osgi.framework.BundleContext ctx)
|
Method Summary |
void |
dispose()
|
<ServiceType>
ServiceType |
|
getService(Class<ServiceType> type)
Return a service for the given service class. |
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
references
protected final 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.
ServiceCache
public ServiceCache(org.osgi.framework.BundleContext ctx)
dispose
public void dispose()
getService
public <ServiceType> ServiceType getService(Class<ServiceType> type)
- Return a service for the given service class.
- Type Parameters:
ServiceType
- The service class / interface- Parameters:
type
- The requested service
- Returns:
- The service or
null
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent event)
- Specified by:
serviceChanged
in interface org.osgi.framework.ServiceListener
- See Also:
ServiceListener.serviceChanged(org.osgi.framework.ServiceEvent)
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.