org.robokind.api.common.osgi
Class SingleServiceListener<T>

java.lang.Object
  extended by org.robokind.api.common.property.PropertyChangeNotifier
      extended by org.robokind.api.common.osgi.SingleServiceListener<T>
All Implemented Interfaces:
EventListener, org.osgi.framework.ServiceListener, PropertyChangeSource

public class SingleServiceListener<T>
extends PropertyChangeNotifier
implements org.osgi.framework.ServiceListener

Author:
Matthew Stevenson

Field Summary
protected  org.osgi.framework.BundleContext myContext
           
static String PROP_SERVICE_MODIFIED
           
static String PROP_SERVICE_REMOVED
           
static String PROP_SERVICE_TRACKED
           
 
Constructor Summary
SingleServiceListener(Class<T> clazz, org.osgi.framework.BundleContext context, String serviceFilter)
           
 
Method Summary
 T getService()
           
 void releaseService()
           
 void serviceChanged(org.osgi.framework.ServiceEvent se)
           
 boolean start()
           
 void stop()
           
 
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SERVICE_TRACKED

public static final String PROP_SERVICE_TRACKED
See Also:
Constant Field Values

PROP_SERVICE_MODIFIED

public static final String PROP_SERVICE_MODIFIED
See Also:
Constant Field Values

PROP_SERVICE_REMOVED

public static final String PROP_SERVICE_REMOVED
See Also:
Constant Field Values

myContext

protected org.osgi.framework.BundleContext myContext
Constructor Detail

SingleServiceListener

public SingleServiceListener(Class<T> clazz,
                             org.osgi.framework.BundleContext context,
                             String serviceFilter)
Parameters:
context -
list -
Method Detail

getService

public T getService()

releaseService

public void releaseService()

start

public boolean start()

stop

public void stop()

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent se)
Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener


Copyright © 2011. All Rights Reserved.