public final class TenantedProxyFactory extends Object implements org.springframework.beans.factory.BeanFactoryAware
| Constructor and Description |
|---|
TenantedProxyFactory(TenantRegistry tenantRegistry) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createProxy(Class<T> beanType,
String tenantedDelegateBeanName)
Create a tenancy-aware proxy for a given target type, which delegates to a designed target bean if there is a tenant,
or throws an exception if there isn't.
|
<T> T |
createProxy(Class<T> beanType,
String tenantedDelegateBeanName,
String vacantDelegateBeanName)
Create a tenancy-aware proxy for a given target type, which delegates to either one of two target beans depending
on tenancy state.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
public TenantedProxyFactory(TenantRegistry tenantRegistry)
public <T> T createProxy(Class<T> beanType, String tenantedDelegateBeanName, String vacantDelegateBeanName)
beanType - The common type of the delegate beanstenantedDelegateBeanName - The name of the delegate bean to be used when there is a tenantvacantDelegateBeanName - The name of the delegate bean to use when there isn't a tenantpublic <T> T createProxy(Class<T> beanType, String tenantedDelegateBeanName)
beanType - The common type of the delegate beanstenantedDelegateBeanName - The name of the delegate bean to be used when there is a tenantpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionCopyright © 2003–2022 Atlassian. All rights reserved.