com.atlassian.plugin.osgi.bridge.external
Class HostComponentFactoryBean

java.lang.Object
  extended by com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.osgi.context.BundleContextAware

public class HostComponentFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.osgi.context.BundleContextAware, org.springframework.beans.factory.InitializingBean

Simple factory bean to resolve host components. Since we know host components won't change during the bundle's lifetime, we can use a direct reference instead of the fancy proxy stuff from Spring DM.

Since:
2.2.0

Constructor Summary
HostComponentFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 Object getObject()
           
 Class getObjectType()
           
 boolean isSingleton()
           
 void setBundleContext(org.osgi.framework.BundleContext bundleContext)
           
 void setFilter(String filter)
          Sets the OSGi service filter.
 void setInterfaces(Class<?>[] interfaces)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostComponentFactoryBean

public HostComponentFactoryBean()
Method Detail

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
Exception

getObjectType

public Class getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean

setBundleContext

public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
Specified by:
setBundleContext in interface org.springframework.osgi.context.BundleContextAware

setFilter

public void setFilter(String filter)
Sets the OSGi service filter.

Parameters:
filter - OSGi filter describing the importing OSGi service

setInterfaces

public void setInterfaces(Class<?>[] interfaces)

afterPropertiesSet

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


Copyright © 2010 Atlassian. All Rights Reserved.