Class ServiceHolder<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ServiceHolder<T>
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceHolder​(org.osgi.framework.ServiceReference<T> serviceReference)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      T getService()  
      void release()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceHolder

        public ServiceHolder​(org.osgi.framework.ServiceReference<T> serviceReference)
    • Method Detail

      • getService

        public T getService()
      • release

        public void release()
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception