com.atlassian.applinks.host
Class OsgiServiceProxyFactory

java.lang.Object
  extended by com.atlassian.applinks.host.OsgiServiceProxyFactory

public class OsgiServiceProxyFactory
extends java.lang.Object

Creates a proxy for an osgi service that is able to link to different implementations at runtime. Limited to one interface.

Since:
3.0

Nested Class Summary
static class OsgiServiceProxyFactory.ServiceTimeoutExceeded
          Thrown if the timeout waiting for the service has been exceeded
static interface OsgiServiceProxyFactory.ServiceTrackerFactory
          Abstracts how service trackers are created, mostly for testing
 
Constructor Summary
OsgiServiceProxyFactory(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager)
          Constructs a service proxy factory, using the OsgiContainerManager's service tracker
OsgiServiceProxyFactory(OsgiServiceProxyFactory.ServiceTrackerFactory serviceTrackerFactory)
           
 
Method Summary
<T> T
createProxy(java.lang.Class<T> apiClass, long timeoutInMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiServiceProxyFactory

public OsgiServiceProxyFactory(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager)
Constructs a service proxy factory, using the OsgiContainerManager's service tracker

Parameters:
osgiContainerManager - The osgi container manager

OsgiServiceProxyFactory

public OsgiServiceProxyFactory(OsgiServiceProxyFactory.ServiceTrackerFactory serviceTrackerFactory)
Method Detail

createProxy

public <T> T createProxy(java.lang.Class<T> apiClass,
                         long timeoutInMillis)


Copyright © 2011 Atlassian. All Rights Reserved.