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.Log
,
LogFactory
,
BeanClassLoaderAware
,
BeanFactory
,
BeanFactoryAware
,
BeanNameAware
,
FactoryBean
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEFAULT_SINGLETON |
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
AbstractFactoryBeanSupport()
Constructs a new instance of
AbstractFactoryBeanSupport and initialized the logger. |
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.slf4j.Logger |
getLog()
|
boolean |
isSingleton()
Indicates that this
FactoryBean produces a single bean instance. |
protected void |
logDebug(String message,
Object... args)
|
protected void |
logDebug(Supplier<String> message)
|
protected void |
logError(String message,
Object... args)
|
protected void |
logError(Supplier<String> message)
|
protected void |
logInfo(String message,
Object... args)
|
protected void |
logInfo(Supplier<String> message)
|
protected void |
logWarning(String message,
Object... args)
|
protected void |
logWarning(Supplier<String> message)
|
protected org.slf4j.Logger |
newLog()
Constructs a new instance of
Logger 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, wait
getObject, getObjectType
protected static final boolean DEFAULT_SINGLETON
protected AbstractFactoryBeanSupport()
AbstractFactoryBeanSupport
and initialized the logger.newLog()
protected org.slf4j.Logger newLog()
Logger
to log statements printed by Spring Data GemFire/Geode.Logger
.LogFactory.getLog(Class)
,
Log
public void setBeanClassLoader(ClassLoader classLoader)
ClassLoader
used by the Spring container to load and create bean classes.setBeanClassLoader
in interface BeanClassLoaderAware
classLoader
- ClassLoader
used by the Spring container to load and create bean classes.BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
,
ClassLoader
public 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)
,
ClassLoader
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
BeanFactory
in which this FactoryBean
was declared.setBeanFactory
in interface BeanFactoryAware
beanFactory
- reference to the declaring Spring BeanFactory
.BeansException
BeanFactoryAware.setBeanFactory(BeanFactory)
,
BeanFactory
public BeanFactory getBeanFactory()
BeanFactory
in which this FactoryBean
was declared.BeanFactory
.BeanFactoryAware.setBeanFactory(BeanFactory)
,
BeanFactory
public void setBeanName(String name)
bean name
assigned to this FactoryBean
as declared in the Spring container.setBeanName
in interface BeanNameAware
name
- bean name
assigned to this FactoryBean
as declared in the Spring container.BeanNameAware.setBeanName(String)
,
String
public 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)
,
String
protected org.slf4j.Logger getLog()
Logger
used by this FactoryBean
to log messages
.Log
public 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(Supplier<String> message)
message
- 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(Supplier<String> message)
message
- 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(Supplier<String> message)
message
- 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(Supplier<String> message)
message
- Supplier
containing the message
and arguments to log.Log.isErrorEnabled()
,
Log.error(Object)
,
getLog()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.