Interface IServiceReferenceHolder<T>

  • Type Parameters:
    T -
    All Known Implementing Classes:
    DynamicServiceReference

    public interface IServiceReferenceHolder<T>
    Dynamic service reference holder for a service object. For cache usage, you should cache this instead of service object
    Author:
    hengsin
    • Method Detail

      • 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