public class FeatureProxyFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean
Implementation of FactoryBean that creates a proxy that delegates invocation to one of two target beans depending on
that state of a given feature.
You can use the factory like this:
<bean id="someService" class="org.togglz.spring.proxy.FeatureProxyFactoryBean"> <property name="feature" value="FEATURE_ONE" /> <property name="active" ref="newServiceImpl" /> <property name="inactive" ref="oldServiceImpl" /> </bean>
| Constructor and Description |
|---|
FeatureProxyFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Object |
getActive() |
String |
getFeature() |
Object |
getInactive() |
Object |
getObject() |
Class<?> |
getObjectType() |
Class<?> |
getProxyType() |
boolean |
isSingleton() |
void |
setActive(Object active) |
void |
setFeature(String feature) |
void |
setInactive(Object inactive) |
void |
setProxyType(Class<?> proxyType) |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<Object>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<Object>public String getFeature()
public void setFeature(String feature)
public Object getActive()
public void setActive(Object active)
public Object getInactive()
public void setInactive(Object inactive)
public Class<?> getProxyType()
public void setProxyType(Class<?> proxyType)
Copyright © 2022. All rights reserved.