com.atlassian.bamboo.plugin
Class OsgiServiceProxyFactoryImpl

java.lang.Object
  extended by com.atlassian.bamboo.plugin.OsgiServiceProxyFactoryImpl
All Implemented Interfaces:
OsgiServiceProxyFactory, org.springframework.beans.factory.InitializingBean

public class OsgiServiceProxyFactoryImpl
extends java.lang.Object
implements OsgiServiceProxyFactory, org.springframework.beans.factory.InitializingBean


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

Constructor Detail

OsgiServiceProxyFactoryImpl

public OsgiServiceProxyFactoryImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                                   com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager,
                                   long defaultTimeout)
Constructs a service proxy factory, using the OsgiContainerManager's service tracker

Parameters:
osgiContainerManager - the osgi container manager
defaultTimeout - the default timeout for service invocations

OsgiServiceProxyFactoryImpl

public OsgiServiceProxyFactoryImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                                   OsgiServiceProxyFactoryImpl.ServiceTrackerFactory serviceTrackerFactory,
                                   long defaultTimeout)
Method Detail

createProxy

public <T> T createProxy(java.lang.Class<T> apiClass,
                         long timeoutInMillis)
Specified by:
createProxy in interface OsgiServiceProxyFactory

createProxy

public <T> T createProxy(java.lang.Class<T> apiClass)
Specified by:
createProxy in interface OsgiServiceProxyFactory

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

onPluginFrameworkShutdownEvent

public void onPluginFrameworkShutdownEvent(@NotNull
                                           com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.