com.atlassian.confluence.osgi
Class OsgiServiceRegistryImpl

java.lang.Object
  extended by com.atlassian.confluence.osgi.OsgiServiceRegistryImpl
All Implemented Interfaces:
OsgiServiceRegistry, org.springframework.beans.factory.DisposableBean

public class OsgiServiceRegistryImpl
extends Object
implements OsgiServiceRegistry, org.springframework.beans.factory.DisposableBean

This implementation will hand out services in the form of Proxy's that lazily use the underlying ServiceTracker when invoked.


Constructor Summary
OsgiServiceRegistryImpl(com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager osgiContainerManager)
           
 
Method Summary
 void destroy()
           
<T> T
getService(Class<T> clazz)
          Provides an implementation of the given interface T that is guaranteed to be backed by the highest ranked OSGI service implementing T.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiServiceRegistryImpl

public OsgiServiceRegistryImpl(com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager osgiContainerManager)
Method Detail

getService

public <T> T getService(Class<T> clazz)
Description copied from interface: OsgiServiceRegistry
Provides an implementation of the given interface T that is guaranteed to be backed by the highest ranked OSGI service implementing T. The provided implementation will fail fast if the service is not available - it will NOT wait for the service to become available. It is expected callers will use this method to obtain services that they will invoke later in response to user activity. Invoking methods on returned implementation immediately will probably not work, unless you know what you're doing.

Specified by:
getService in interface OsgiServiceRegistry

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception


Copyright © 2003–2015 Atlassian. All rights reserved.