public class ClusterAwareFactoryBean<T>
extends org.springframework.beans.factory.config.AbstractFactoryBean
FactoryBean
locates another bean in the context for a given type.
If clustering is enabled, then the selected bean must have a definition with the qualifier "clustered-implementation".
If clustering is not enabled, then any bean of the given type is acceptable.
See HibernateCacheFactory
and its implementations.
See ClusterManager.isClustered()
Constructor and Description |
---|
ClusterAwareFactoryBean(ClusteredImplementationBeanRegistry clusteredImplementationBeanRegistry,
ClusterManager clusterManager) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected T |
createInstance() |
java.lang.Class |
getObjectType() |
void |
setDefaultBeanType(java.lang.Class<? extends T> defaultBeanType) |
void |
setTargetBeanType(java.lang.Class<T> targetBeanType) |
public ClusterAwareFactoryBean(ClusteredImplementationBeanRegistry clusteredImplementationBeanRegistry, ClusterManager clusterManager)
public java.lang.Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
getObjectType
in class org.springframework.beans.factory.config.AbstractFactoryBean
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.beans.factory.config.AbstractFactoryBean
java.lang.Exception
public void setTargetBeanType(java.lang.Class<T> targetBeanType)
public void setDefaultBeanType(java.lang.Class<? extends T> defaultBeanType)
protected T createInstance() throws java.lang.Exception
createInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean
java.lang.Exception
Copyright © 2003-2014 Atlassian. All Rights Reserved.