Package org.adempiere.base.ds
Class DynamicServiceReference<T>
- java.lang.Object
-
- org.adempiere.base.ds.DynamicServiceReference<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
IServiceReferenceHolder<T>
public class DynamicServiceReference<T> extends Object implements IServiceReferenceHolder<T>
IServiceReferenceHolder implementation using ServiceTracker- Author:
- hengsin
-
-
Constructor Summary
Constructors Constructor Description DynamicServiceReference(org.osgi.util.tracker.ServiceTracker<T,T> tracker, org.osgi.framework.ServiceReference<T> serviceReference)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getService()
Get service object from cache service referenceorg.osgi.framework.ServiceReference<T>
getServiceReference()
Get the cache service reference
-
-
-
Method Detail
-
getService
public T getService()
Description copied from interface:IServiceReferenceHolder
Get service object from cache service reference- Specified by:
getService
in interfaceIServiceReferenceHolder<T>
- Returns:
- Service Object or null if the osgi service is no longer available
-
getServiceReference
public org.osgi.framework.ServiceReference<T> getServiceReference()
Description copied from interface:IServiceReferenceHolder
Get the cache service reference- Specified by:
getServiceReference
in interfaceIServiceReferenceHolder<T>
- Returns:
- ServiceReference
-
-