org.ops4j.pax.swissbox.tracker
Class DefaultServiceCollectionListener<T>
java.lang.Object
org.ops4j.pax.swissbox.tracker.DefaultServiceCollectionListener<T>
- All Implemented Interfaces:
- ServiceCollectionListener<T>
public class DefaultServiceCollectionListener<T>
- extends Object
- implements ServiceCollectionListener<T>
Default implementation of ServiceCollectionListener.
Is a convenience class so subclasses are implement just the necessary methods.
- Since:
- October 14, 2007
- Author:
- Alin Dreghiciu
Method Summary |
boolean |
serviceAdded(org.osgi.framework.ServiceReference serviceReference,
T service)
Default implementation just returns true, so the service get's added to the collection. |
void |
serviceRemoved(org.osgi.framework.ServiceReference serviceReference,
T service)
Default implementation does nothing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultServiceCollectionListener
public DefaultServiceCollectionListener()
serviceAdded
public boolean serviceAdded(org.osgi.framework.ServiceReference serviceReference,
T service)
- Default implementation just returns true, so the service get's added to the collection.
- Specified by:
serviceAdded
in interface ServiceCollectionListener<T>
- Parameters:
serviceReference
- service reference of the added serviceservice
- the service that was added
- Returns:
- true if the service should be retained in the collection, false otherwise
- See Also:
ServiceCollectionListener.serviceAdded(org.osgi.framework.ServiceReference,Object)
serviceRemoved
public void serviceRemoved(org.osgi.framework.ServiceReference serviceReference,
T service)
- Default implementation does nothing.
- Specified by:
serviceRemoved
in interface ServiceCollectionListener<T>
- Parameters:
serviceReference
- service reference of the removed serviceservice
- the service that was removed- See Also:
ServiceCollectionListener.serviceRemoved(org.osgi.framework.ServiceReference,Object)
Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.