Class AbstractFactoryBeanSupport<T>
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<T>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.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 org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware
An abstract Spring
FactoryBean
base class implementation encapsulating operations common to all
Spring Data for Apache Geode (SDG) FactoryBean
implementations.- Since:
- 1.0.0
- See Also:
-
Logger
LoggerFactory
BeanClassLoaderAware
BeanFactory
BeanFactoryAware
BeanNameAware
FactoryBean
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructs a new instance ofAbstractFactoryBeanSupport
initializing aLogger
to log operations performed by thisFactoryBean
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to theClassLoader
used by the Spring container to load beanclasses
.org.springframework.beans.factory.BeanFactory
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
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
Constructs a new instance ofLogger
to log statements printed by Spring Data for Apache Geode.void
setBeanClassLoader
(ClassLoader classLoader) Sets a reference to theClassLoader
used by the Spring container to load beanclasses
.void
setBeanFactory
(org.springframework.beans.factory.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 aLogger
to log operations performed by thisFactoryBean
.- See Also:
-
-
Method Details
-
newLogger
@NonNull protected org.slf4j.Logger newLogger()Constructs a new instance ofLogger
to log statements printed by Spring Data for Apache Geode.- Returns:
- a new instance of SLF4J
Logger
. - See Also:
-
LogFactory.getLog(Class)
Log
-
setBeanClassLoader
Sets a reference to theClassLoader
used by the Spring container to load beanclasses
.- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
- Parameters:
classLoader
-ClassLoader
used by the Spring container to load beanclasses
.- See Also:
-
BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
ClassLoader
Class
-
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:
-
BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
ClassLoader
Class
-
setBeanFactory
public void setBeanFactory(@Nullable org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException Sets a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Parameters:
beanFactory
- reference to the declaring SpringBeanFactory
.- Throws:
org.springframework.beans.BeansException
- See Also:
-
BeanFactoryAware.setBeanFactory(BeanFactory)
BeanFactory
-
getBeanFactory
@Nullable public org.springframework.beans.factory.BeanFactory getBeanFactory()Returns a reference to the SpringBeanFactory
in which thisFactoryBean
was declared.- Returns:
- a reference to the declaring Spring
BeanFactory
. - See Also:
-
BeanFactoryAware.setBeanFactory(BeanFactory)
BeanFactory
-
setBeanName
Sets thebean name
assigned to thisFactoryBean
as declared in the Spring container. -
getBeanName
Returns thebean name
assigned to thisFactoryBean
as declared in the Spring container. -
getLogger
@NonNull protected org.slf4j.Logger getLogger()- Returns:
- a reference to the
Logger
used by thisFactoryBean
to logmessages
. - See Also:
-
Log
-
getOptionalLogger
- Returns:
- an
Optional
reference to theLogger
used by thisFactoryBean
to logmessages
. - See Also:
-
Optional
Logger
getLogger()
-
isDebugLoggingEnabled
public boolean isDebugLoggingEnabled()Determines whether DEBUG logging is enabled.- Returns:
- a boolean value indicating whether DEBUG logging is enabled.
- See Also:
-
Logger.isDebugEnabled()
getOptionalLogger()
-
isInfoLoggingEnabled
public boolean isInfoLoggingEnabled()Determines whether INFO logging is enabled.- Returns:
- a boolean value indicating whether INFO logging is enabled.
- See Also:
-
Logger.isInfoEnabled()
getOptionalLogger()
-
isWarnLoggingEnabled
public boolean isWarnLoggingEnabled()Determines whether WARN logging is enabled.- Returns:
- a boolean value indicating whether WARN logging is enabled.
- See Also:
-
Logger.isWarnEnabled()
getOptionalLogger()
-
isErrorLoggingEnabled
public boolean isErrorLoggingEnabled()Determines whether ERROR logging is enabled.- Returns:
- a boolean value indicating whether ERROR logging is enabled.
- See Also:
-
Logger.isErrorEnabled()
getOptionalLogger()
-
isSingleton
public boolean isSingleton()Indicates that thisFactoryBean
produces a single bean instance.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<T>
- Returns:
- true by default.
- See Also:
-
FactoryBean.isSingleton()
-
logDebug
-
logDebug
- Parameters:
message
-Supplier
containing themessage
and arguments to log.- See Also:
-
Log.isDebugEnabled()
Log.debug(Object)
getLogger()
-
logInfo
-
logInfo
- Parameters:
message
-Supplier
containing themessage
and arguments to log.- See Also:
-
Log.isInfoEnabled()
Log.info(Object)
getLogger()
-
logWarning
-
logWarning
- Parameters:
message
-Supplier
containing themessage
and arguments to log.- See Also:
-
Log.isWarnEnabled()
Log.warn(Object)
getLogger()
-
logError
-
logError
- Parameters:
message
-Supplier
containing themessage
and arguments to log.- See Also:
-
Log.isErrorEnabled()
Log.error(Object)
getLogger()
-