|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ops4j.peaberry.util.AbstractWatcher<S>
public abstract class AbstractWatcher<S>
Skeletal implementation to simplify development of ServiceWatchers.
Developers only have to extend this class and provide implementations of the
adding(Import), modified(Object, Map), and removed(S)
service tracking methods. The design of this helper class is loosely based on
the OSGi ServiceTrackerCustomizer.
| Constructor Summary | |
|---|---|
AbstractWatcher()
|
|
| Method Summary | ||
|---|---|---|
|
add(Import<T> service)
Add the given service to this watcher. |
|
protected S |
adding(Import<S> service)
Notification that a service has been added to this watcher. |
|
protected void |
modified(S instance,
Map<String,?> attributes)
Notification that some service attributes have been modified. |
|
protected void |
removed(S instance)
Notification that a service has been removed from this watcher. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractWatcher()
| Method Detail |
|---|
public final <T extends S> Export<T> add(Import<T> service)
ServiceWatcher
add in interface ServiceWatcher<S>service - imported service handle
protected S adding(Import<S> service)
service - new service handle
protected void modified(S instance,
Map<String,?> attributes)
instance - tracking instanceattributes - service attributesprotected void removed(S instance)
instance - tracking instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||