org.ops4j.peaberry.cache
Class FilteredServiceWatcher<S>

java.lang.Object
  extended by org.ops4j.peaberry.cache.FilteredServiceWatcher<S>
All Implemented Interfaces:
ServiceWatcher<S>

public final class FilteredServiceWatcher<S>
extends Object
implements ServiceWatcher<S>

Pre-filtered ServiceWatcher that handles mutable services.

Author:
mcculls@gmail.com (Stuart McCulloch)

Constructor Summary
FilteredServiceWatcher(AttributeFilter filter, ServiceWatcher<S> watcher)
           
 
Method Summary
<T extends S>
Export<T>
add(Import<T> service)
          Add the given service to this watcher.
 boolean equals(Object rhs)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredServiceWatcher

public FilteredServiceWatcher(AttributeFilter filter,
                              ServiceWatcher<S> watcher)
Method Detail

add

public <T extends S> Export<T> add(Import<T> service)
Description copied from interface: ServiceWatcher
Add the given service to this watcher.

Specified by:
add in interface ServiceWatcher<S>
Parameters:
service - imported service handle
Returns:
exported service handle, null if the watcher is not interested

equals

public boolean equals(Object rhs)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.