Class SingleServiceTracker<T>

  • All Implemented Interfaces:
    EventListener, org.osgi.framework.ServiceListener

    public final class SingleServiceTracker<T>
    extends Object
    implements org.osgi.framework.ServiceListener
    • Constructor Detail

      • SingleServiceTracker

        public SingleServiceTracker​(org.osgi.framework.BundleContext context,
                                    Class<T> clazz,
                                    BiConsumer<T,​T> sl)
                             throws org.osgi.framework.InvalidSyntaxException
        Throws:
        org.osgi.framework.InvalidSyntaxException
      • SingleServiceTracker

        public SingleServiceTracker​(org.osgi.framework.BundleContext context,
                                    Class<T> clazz,
                                    String filterString,
                                    BiConsumer<T,​T> sl)
                             throws org.osgi.framework.InvalidSyntaxException
        Throws:
        org.osgi.framework.InvalidSyntaxException
      • SingleServiceTracker

        public SingleServiceTracker​(org.osgi.framework.BundleContext context,
                                    String className,
                                    String filterString,
                                    BiConsumer<T,​T> sl)
                             throws org.osgi.framework.InvalidSyntaxException
        Throws:
        org.osgi.framework.InvalidSyntaxException
    • Method Detail

      • getService

        public T getService()
      • getServiceReference

        public org.osgi.framework.ServiceReference getServiceReference()
      • open

        public void open()
      • serviceChanged

        public void serviceChanged​(org.osgi.framework.ServiceEvent event)
        Specified by:
        serviceChanged in interface org.osgi.framework.ServiceListener
      • close

        public void close()