Package com.atlassian.bamboo.plugin.osgi
Class OsgiServiceProxyFactoryImpl
- java.lang.Object
-
- com.atlassian.bamboo.plugin.osgi.OsgiServiceProxyFactoryImpl
-
- All Implemented Interfaces:
OsgiServiceProxyFactory
public class OsgiServiceProxyFactoryImpl extends Object implements OsgiServiceProxyFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OsgiServiceProxyFactoryImpl.ServiceTimeoutExceeded
Thrown if the timeout waiting for the service has been exceeded
-
Constructor Summary
Constructors Constructor Description OsgiServiceProxyFactoryImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager)
Constructs a service proxy factory, using the OsgiContainerManager's service tracker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
<T> T
createNonIsolatingProxy(Class<T> apiClass, long timeoutInMillis)
Creates a service proxy with a custom timeout.<T> T
createProxy(Class<T> apiClass)
Creates a service proxy with a default timeout.<T> T
createProxy(Class<T> apiClass, long timeoutInMillis)
Creates a service proxy with a custom timeout.void
onPluginFrameworkShutdownEvent(@NotNull com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent ignored)
-
-
-
Constructor Detail
-
OsgiServiceProxyFactoryImpl
public OsgiServiceProxyFactoryImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager, com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager)
Constructs a service proxy factory, using the OsgiContainerManager's service tracker- Parameters:
osgiContainerManager
- the osgi container manager
-
-
Method Detail
-
createProxy
public <T> T createProxy(Class<T> apiClass, long timeoutInMillis)
Description copied from interface:OsgiServiceProxyFactory
Creates a service proxy with a custom timeout. Methods of this proxy will be executed within the classloader of the OSGi bundle.- Specified by:
createProxy
in interfaceOsgiServiceProxyFactory
-
createNonIsolatingProxy
public <T> T createNonIsolatingProxy(Class<T> apiClass, long timeoutInMillis)
Description copied from interface:OsgiServiceProxyFactory
Creates a service proxy with a custom timeout. Methods of this proxy will be executed within the classloader of the caller.- Specified by:
createNonIsolatingProxy
in interfaceOsgiServiceProxyFactory
-
createProxy
public <T> T createProxy(Class<T> apiClass)
Description copied from interface:OsgiServiceProxyFactory
Creates a service proxy with a default timeout.- Specified by:
createProxy
in interfaceOsgiServiceProxyFactory
-
afterPropertiesSet
@PostConstruct public void afterPropertiesSet() throws Exception
- Throws:
Exception
-
onPluginFrameworkShutdownEvent
public void onPluginFrameworkShutdownEvent(@NotNull @NotNull com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent ignored)
-
-