Interface IServiceReferenceHolder<T>

Type Parameters:
T -
All Known Implementing Classes:
DynamicServiceReference

public interface IServiceReferenceHolder<T>
Service reference holder for a service object.
For caching of service, you should cache this instead of the service object.
Author:
hengsin
  • Method Summary

    Modifier and Type
    Method
    Description
    Get service object from cache service reference
    org.osgi.framework.ServiceReference<T>
    Get the cache service reference
  • Method Details

    • getService

      T getService()
      Get service object from cache service reference
      Returns:
      Service Object or null if the osgi service is no longer available
    • getServiceReference

      org.osgi.framework.ServiceReference<T> getServiceReference()
      Get the cache service reference
      Returns:
      ServiceReference