org.apache.felix.gogo.jline

## Class SingleServiceTracker<T>

- java.lang.Object
- - org.apache.felix.gogo.jline.SingleServiceTracker<T>

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

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

### Nested Class Summary

Nested Classes
`static interface` `SingleServiceTracker.SingleServiceListener`

### Constructor Summary

Constructors
Constructor and Description
`SingleServiceTracker(org.osgi.framework.BundleContext context, Class<T> clazz, SingleServiceTracker.SingleServiceListener sl)`
`SingleServiceTracker(org.osgi.framework.BundleContext context, Class<T> clazz, String filterString, SingleServiceTracker.SingleServiceListener sl)`
`SingleServiceTracker(org.osgi.framework.BundleContext context, String className, String filterString, SingleServiceTracker.SingleServiceListener sl)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`T` `getService()`
`org.osgi.framework.ServiceReference<?>` `getServiceReference()`
`void` `open()`
`void` `serviceChanged(org.osgi.framework.ServiceEvent event)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SingleServiceTracker

    public SingleServiceTracker(org.osgi.framework.BundleContext context,
                                Class<T> clazz,
                                SingleServiceTracker.SingleServiceListener sl)
                         throws org.osgi.framework.InvalidSyntaxException

Throws:
  `org.osgi.framework.InvalidSyntaxException`

#### SingleServiceTracker

    public SingleServiceTracker(org.osgi.framework.BundleContext context,
                                Class<T> clazz,
                                String filterString,
                                SingleServiceTracker.SingleServiceListener sl)
                         throws org.osgi.framework.InvalidSyntaxException

Throws:
  `org.osgi.framework.InvalidSyntaxException`

#### SingleServiceTracker

    public SingleServiceTracker(org.osgi.framework.BundleContext context,
                                String className,
                                String filterString,
                                SingleServiceTracker.SingleServiceListener 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()