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:
Serializable, BeanFactoryAware, FactoryBean

public class PlaceholderProxyFactoryBean
extends ProxyConfig
implements FactoryBean, 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 BeanDefinitionHolder createScopedProxy(BeanDefinitionHolder definition, 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.
 Object getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setBeanFactory(BeanFactory beanFactory)
           
 void setTargetBeanName(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(String targetBeanName)
Set the name of the bean that is to be scoped.


setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Specified by:
setBeanFactory in interface BeanFactoryAware

getObject

public Object getObject()
Specified by:
getObject in interface FactoryBean

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean

createScopedProxy

public static BeanDefinitionHolder createScopedProxy(BeanDefinitionHolder definition,
                                                     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 © 2013 SpringSource. All Rights Reserved.