org.ops4j.peaberry.osgi
Class OSGiServiceRegistry

java.lang.Object
  extended by org.ops4j.peaberry.cache.AbstractServiceRegistry
      extended by org.ops4j.peaberry.osgi.OSGiServiceRegistry
All Implemented Interfaces:
CachingServiceRegistry, ServiceRegistry, ServiceWatcher<Object>

public class OSGiServiceRegistry
extends AbstractServiceRegistry

OSGi ServiceRegistry implementation.

Author:
mcculls@gmail.com (Stuart McCulloch)

Constructor Summary
OSGiServiceRegistry(org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
<T> Export<T>
add(Import<T> service)
          Add the given service to this watcher.
protected
<T> AbstractServiceListener<T>
createListener(String ldapFilter)
           
 boolean equals(Object rhs)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.ops4j.peaberry.cache.AbstractServiceRegistry
flush, lookup, watch
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OSGiServiceRegistry

@Inject
public OSGiServiceRegistry(org.osgi.framework.BundleContext bundleContext)
Method Detail

toString

public final String toString()
Overrides:
toString in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

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

createListener

protected final <T> AbstractServiceListener<T> createListener(String ldapFilter)
Specified by:
createListener in class AbstractServiceRegistry

add

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

Parameters:
service - imported service handle
Returns:
exported service handle, null if the watcher is not interested


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