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

java.lang.Object
  extended by com.atlassian.plugin.osgi.bridge.external.MultiTenantComponentFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware

public class MultiTenantComponentFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean

Spring FactoryBean, that returns a proxy to the component that selects the correct component based on the current tenant. Components are lazily instantiated, and DisposableBeans destroy() methods are called when a tenant is stopped.


Constructor Summary
MultiTenantComponentFactoryBean()
           
 
Method Summary
 void destroy()
           
 Object getObject()
           
 Class getObjectType()
           
 boolean isSingleton()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setBeanName(String name)
           
 void setImplementation(Class implementation)
           
 void setInterfaces(Class[] interfaces)
           
 void setLazyLoad(boolean lazyLoad)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTenantComponentFactoryBean

public MultiTenantComponentFactoryBean()
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

destroy

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

isSingleton

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

setInterfaces

public void setInterfaces(Class[] interfaces)

setImplementation

public void setImplementation(Class implementation)

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

setLazyLoad

public void setLazyLoad(boolean lazyLoad)


Copyright © 2011 Atlassian. All Rights Reserved.