public abstract class AbstractFactoryBeanSupport<T> extends Object implements FactoryBean<T>, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware
AbstractFactoryBeanSupport class is an abstract Spring FactoryBean base class implementation
encapsulating operations common to SDG's FactoryBean implementations.BeanClassLoaderAware,
BeanFactory,
BeanFactoryAware,
BeanNameAware,
FactoryBean| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractFactoryBeanSupport.StringFormatSupplier |
protected static interface |
AbstractFactoryBeanSupport.Supplier<T> |
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEFAULT_SINGLETON |
| Constructor and Description |
|---|
AbstractFactoryBeanSupport() |
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getBeanClassLoader()
Returns a reference to the
ClassLoader used by the Spring container to load and create bean classes. |
BeanFactory |
getBeanFactory()
Returns a reference to the Spring
BeanFactory in which this FactoryBean was declared. |
String |
getBeanName()
Returns the
bean name assigned to this FactoryBean as declared in the Spring container. |
protected org.apache.commons.logging.Log |
getLog()
|
boolean |
isSingleton()
Indicates that this
FactoryBean produces a single bean instance. |
protected void |
logDebug(AbstractFactoryBeanSupport.Supplier<String> message)
Logs the
message supplied by the given AbstractFactoryBeanSupport.Supplier at debug level. |
protected void |
logDebug(String message,
Object... args)
|
protected void |
logError(AbstractFactoryBeanSupport.Supplier<String> message)
Logs the
message supplied by the given AbstractFactoryBeanSupport.Supplier at error level. |
protected void |
logError(String message,
Object... args)
|
protected void |
logInfo(AbstractFactoryBeanSupport.Supplier<String> message)
Logs the
message supplied by the given AbstractFactoryBeanSupport.Supplier at info level. |
protected void |
logInfo(String message,
Object... args)
|
protected void |
logWarning(AbstractFactoryBeanSupport.Supplier<String> message)
Logs the
message supplied by the given AbstractFactoryBeanSupport.Supplier at warn level. |
protected void |
logWarning(String message,
Object... args)
|
protected org.apache.commons.logging.Log |
newLog()
Constructs a new instance of
Log to log statements printed by Spring Data GemFire/Geode. |
void |
setBeanClassLoader(ClassLoader classLoader)
Sets a reference to the
ClassLoader used by the Spring container to load and create bean classes. |
void |
setBeanFactory(BeanFactory beanFactory)
Sets a reference to the Spring
BeanFactory in which this FactoryBean was declared. |
void |
setBeanName(String name)
Sets the
bean name assigned to this FactoryBean as declared in the Spring container. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getObjectTypeprotected static final boolean DEFAULT_SINGLETON
protected org.apache.commons.logging.Log newLog()
Log to log statements printed by Spring Data GemFire/Geode.Log.LogFactory.getLog(Class),
Logpublic void setBeanClassLoader(ClassLoader classLoader)
ClassLoader used by the Spring container to load and create bean classes.setBeanClassLoader in interface BeanClassLoaderAwareclassLoader - ClassLoader used by the Spring container to load and create bean classes.BeanClassLoaderAware.setBeanClassLoader(ClassLoader),
ClassLoaderpublic ClassLoader getBeanClassLoader()
ClassLoader used by the Spring container to load and create bean classes.ClassLoader used by the Spring container to load and create bean classes.BeanClassLoaderAware.setBeanClassLoader(ClassLoader),
ClassLoaderpublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
BeanFactory in which this FactoryBean was declared.setBeanFactory in interface BeanFactoryAwarebeanFactory - reference to the declaring Spring BeanFactory.BeansExceptionBeanFactoryAware.setBeanFactory(BeanFactory),
BeanFactorypublic BeanFactory getBeanFactory()
BeanFactory in which this FactoryBean was declared.BeanFactory.BeanFactoryAware.setBeanFactory(BeanFactory),
BeanFactorypublic void setBeanName(String name)
bean name assigned to this FactoryBean as declared in the Spring container.setBeanName in interface BeanNameAwarename - bean name assigned to this FactoryBean as declared in the Spring container.BeanNameAware.setBeanName(String),
Stringpublic String getBeanName()
bean name assigned to this FactoryBean as declared in the Spring container.bean name assigned to this FactoryBean as declared in the Spring container.BeanNameAware.setBeanName(String),
Stringprotected org.apache.commons.logging.Log getLog()
Log used by this FactoryBean to log messages.Logpublic boolean isSingleton()
FactoryBean produces a single bean instance.isSingleton in interface FactoryBean<T>FactoryBean.isSingleton()protected void logDebug(String message, Object... args)
message - String containing the message to log.args - array of arguments used to format the message.logDebug(Supplier)protected void logDebug(AbstractFactoryBeanSupport.Supplier<String> message)
message supplied by the given AbstractFactoryBeanSupport.Supplier at debug level.message - AbstractFactoryBeanSupport.Supplier containing the message and arguments to log.Log.isDebugEnabled(),
Log.debug(Object),
getLog()protected void logInfo(String message, Object... args)
message - String containing the message to log.args - array of arguments used to format the message.logInfo(Supplier)protected void logInfo(AbstractFactoryBeanSupport.Supplier<String> message)
message supplied by the given AbstractFactoryBeanSupport.Supplier at info level.message - AbstractFactoryBeanSupport.Supplier containing the message and arguments to log.Log.isInfoEnabled(),
Log.info(Object),
getLog()protected void logWarning(String message, Object... args)
message - String containing the message to log.args - array of arguments used to format the message.logWarning(Supplier)protected void logWarning(AbstractFactoryBeanSupport.Supplier<String> message)
message supplied by the given AbstractFactoryBeanSupport.Supplier at warn level.message - AbstractFactoryBeanSupport.Supplier containing the message and arguments to log.Log.isWarnEnabled(),
Log.warn(Object),
getLog()protected void logError(String message, Object... args)
message - String containing the message to log.args - array of arguments used to format the message.logError(Supplier)protected void logError(AbstractFactoryBeanSupport.Supplier<String> message)
message supplied by the given AbstractFactoryBeanSupport.Supplier at error level.message - AbstractFactoryBeanSupport.Supplier containing the message and arguments to log.Log.isErrorEnabled(),
Log.error(Object),
getLog()Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.