Class AbstractFactoryBeanSupport<T>
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<T>
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,BeanNameAware
,FactoryBean<T>
- Direct Known Subclasses:
AbstractBasicCacheFactoryBean
,AbstractWANComponentFactoryBean
,CacheServerFactoryBean
,DiskStoreFactoryBean
,GemfireFunctionProxyFactoryBean
,IndexFactoryBean
,LocatorFactoryBean
,LuceneIndexFactoryBean
,LuceneServiceFactoryBean
,PartitionAttributesFactoryBean
,PoolFactoryBean
,ResolvableRegionFactoryBean
,SmartCacheResolverFactoryBean
,SnapshotServiceFactoryBean
public abstract class AbstractFactoryBeanSupport<T>
extends Object
implements FactoryBean<T>, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware
The
AbstractFactoryBeanSupport
class is an abstract Spring FactoryBean
base class implementation
encapsulating operations common to SDG's FactoryBean
implementations.- Since:
- 1.0.0
- Author:
- John Blum
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructs a new instance ofAbstractFactoryBeanSupport
initializing an object instanceLogger
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to theClassLoader
used by the Spring container to load beanclasses
.Returns a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.Returns thebean name
assigned to thisFactoryBean
as declared in the Spring container.protected org.slf4j.Logger
getLog()
protected Optional<org.slf4j.Logger>
boolean
Determines whether DEBUG logging is enabled.boolean
Determines whether ERROR logging is enabled.boolean
Determines whether INFO logging is enabled.boolean
Indicates that thisFactoryBean
produces a single bean instance.boolean
Determines whether WARN logging is enabled.protected void
protected void
protected void
protected void
protected void
protected void
protected void
logWarning
(String message, Object... args) protected void
logWarning
(Supplier<String> message) protected org.slf4j.Logger
newLog()
Constructs a new instance ofLogger
to log statements printed by Spring Data GemFire/Geode.void
setBeanClassLoader
(ClassLoader classLoader) Sets a reference to theClassLoader
used by the Spring container to load beanclasses
.void
setBeanFactory
(BeanFactory beanFactory) Sets a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.void
setBeanName
(String name) Sets thebean name
assigned to thisFactoryBean
as declared in the Spring container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
getObject, getObjectType
-
Field Details
-
DEFAULT_SINGLETON
protected static final boolean DEFAULT_SINGLETON- See Also:
-
-
Constructor Details
-
AbstractFactoryBeanSupport
protected AbstractFactoryBeanSupport()Constructs a new instance ofAbstractFactoryBeanSupport
initializing an object instanceLogger
.- See Also:
-
-
Method Details
-
newLog
protected org.slf4j.Logger newLog()Constructs a new instance ofLogger
to log statements printed by Spring Data GemFire/Geode.- Returns:
- a new instance of
Logger
. - See Also:
-
setBeanClassLoader
Sets a reference to theClassLoader
used by the Spring container to load beanclasses
.- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
- Parameters:
classLoader
-ClassLoader
used by the Spring container to load beanclasses
.- See Also:
-
getBeanClassLoader
Returns a reference to theClassLoader
used by the Spring container to load beanclasses
.- Returns:
- the
ClassLoader
used by the Spring container to load beanclasses
. - See Also:
-
setBeanFactory
Sets a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Parameters:
beanFactory
- reference to the declaring SpringBeanFactory
.- Throws:
BeansException
- See Also:
-
getBeanFactory
Returns a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.- Returns:
- a reference to the declaring Spring
BeanFactory
. - See Also:
-
setBeanName
Sets thebean name
assigned to thisFactoryBean
as declared in the Spring container.- Specified by:
setBeanName
in interfaceBeanNameAware
- Parameters:
name
-bean name
assigned to thisFactoryBean
as declared in the Spring container.- See Also:
-
getBeanName
Returns thebean name
assigned to thisFactoryBean
as declared in the Spring container.- Returns:
- the
bean name
assigned to thisFactoryBean
as declared in the Spring container. - See Also:
-
getLog
- Returns:
- a reference to the
Logger
used by thisFactoryBean
to logmessages
. - See Also:
-
getOptionalLog
- Returns:
- an
Optional
reference to theLogger
used by thisFactoryBean
to logmessages
. - See Also:
-
isDebugLoggingEnabled
public boolean isDebugLoggingEnabled()Determines whether DEBUG logging is enabled.- Returns:
- a boolean value indicating whether DEBUG logging is enabled.
- See Also:
-
Logger.isDebugEnabled()
getOptionalLog()
-
isInfoLoggingEnabled
public boolean isInfoLoggingEnabled()Determines whether INFO logging is enabled.- Returns:
- a boolean value indicating whether INFO logging is enabled.
- See Also:
-
Logger.isInfoEnabled()
getOptionalLog()
-
isErrorLoggingEnabled
public boolean isErrorLoggingEnabled()Determines whether ERROR logging is enabled.- Returns:
- a boolean value indicating whether ERROR logging is enabled.
- See Also:
-
Logger.isErrorEnabled()
getOptionalLog()
-
isWarnLoggingEnabled
public boolean isWarnLoggingEnabled()Determines whether WARN logging is enabled.- Returns:
- a boolean value indicating whether WARN logging is enabled.
- See Also:
-
Logger.isWarnEnabled()
getOptionalLog()
-
isSingleton
public boolean isSingleton()Indicates that thisFactoryBean
produces a single bean instance.- Specified by:
isSingleton
in interfaceFactoryBean<T>
- Returns:
- true by default.
- See Also:
-
logDebug
-
logDebug
-
logInfo
-
logInfo
-
logWarning
-
logWarning
-
logError
-
logError
-