org.springframework.batch.core.scope.util
Class PlaceholderProxyFactoryBean

java.lang.Object
  extended by org.springframework.aop.framework.ProxyConfig
      extended by org.springframework.batch.core.scope.util.PlaceholderProxyFactoryBean
All Implemented Interfaces:
java.io.Serializable, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean

public class PlaceholderProxyFactoryBean
extends org.springframework.aop.framework.ProxyConfig
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.BeanFactoryAware

Factory bean for proxies that can replace placeholders in their target. Just a specialisation of ScopedProxyFactoryBean, with a different target source type.

Author:
Dave Syer
See Also:
Serialized Form

Constructor Summary
PlaceholderProxyFactoryBean(ContextFactory contextFactory)
          Create a new FactoryBean instance.
 
Method Summary
static org.springframework.beans.factory.config.BeanDefinitionHolder createScopedProxy(org.springframework.beans.factory.config.BeanDefinitionHolder definition, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, boolean proxyTargetClass)
          Convenience method to create a BeanDefinition for a target wrapped in a placeholder tarrget source, able to defer binding of placeholders until the bean is used.
 java.lang.Object getObject()
           
 java.lang.Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setTargetBeanName(java.lang.String targetBeanName)
          Set the name of the bean that is to be scoped.
 
Methods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlaceholderProxyFactoryBean

public PlaceholderProxyFactoryBean(ContextFactory contextFactory)
Create a new FactoryBean instance.

Method Detail

setTargetBeanName

public void setTargetBeanName(java.lang.String targetBeanName)
Set the name of the bean that is to be scoped.


setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware

getObject

public java.lang.Object getObject()
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean

getObjectType

public java.lang.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

createScopedProxy

public static org.springframework.beans.factory.config.BeanDefinitionHolder createScopedProxy(org.springframework.beans.factory.config.BeanDefinitionHolder definition,
                                                                                              org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
                                                                                              boolean proxyTargetClass)
Convenience method to create a BeanDefinition for a target wrapped in a placeholder tarrget source, able to defer binding of placeholders until the bean is used.

Parameters:
definition - a target bean definition
registry - a BeanDefinitionRegistry
proxyTargetClass - true if we need to use CGlib to create the proxies
Returns:
a BeanDefinitionHolder for a PlaceholderProxyFactoryBean


Copyright © 2009. All Rights Reserved.