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
An abstract Spring
FactoryBean base class implementation encapsulating operations common to all
Spring Data for Apache Geode (SDG) FactoryBean implementations.- Since:
- 1.0.0
- Author:
- John Blum
- See Also:
-
LoggerLoggerFactoryBeanClassLoaderAwareBeanFactoryBeanFactoryAwareBeanNameAwareFactoryBean
-
Field Summary
FieldsFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new instance ofAbstractFactoryBeanSupportinitializing aLoggerto log operations performed by thisFactoryBean. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to theClassLoaderused by the Spring container to load beanclasses.Returns a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.Returns thebean nameassigned to thisFactoryBeanas declared in the Spring container.protected org.slf4j.Loggerprotected Optional<org.slf4j.Logger>booleanDetermines whether DEBUG logging is enabled.booleanDetermines whether ERROR logging is enabled.booleanDetermines whether INFO logging is enabled.booleanIndicates that thisFactoryBeanproduces a single bean instance.booleanDetermines whether WARN logging is enabled.protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidlogWarning(String message, Object... args) protected voidlogWarning(Supplier<String> message) protected org.slf4j.LoggerConstructs a new instance ofLoggerto log statements printed by Spring Data for Apache Geode.voidsetBeanClassLoader(ClassLoader classLoader) Sets a reference to theClassLoaderused by the Spring container to load beanclasses.voidsetBeanFactory(BeanFactory beanFactory) Sets a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.voidsetBeanName(String name) Sets thebean nameassigned to thisFactoryBeanas declared in the Spring container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 ofAbstractFactoryBeanSupportinitializing aLoggerto log operations performed by thisFactoryBean.- See Also:
-
-
Method Details
-
newLogger
Constructs a new instance ofLoggerto log statements printed by Spring Data for Apache Geode.- Returns:
- a new instance of SLF4J
Logger. - See Also:
-
setBeanClassLoader
Sets a reference to theClassLoaderused by the Spring container to load beanclasses.- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware- Parameters:
classLoader-ClassLoaderused by the Spring container to load beanclasses.- See Also:
-
getBeanClassLoader
Returns a reference to theClassLoaderused by the Spring container to load beanclasses.- Returns:
- the
ClassLoaderused by the Spring container to load beanclasses. - See Also:
-
setBeanFactory
Sets a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Parameters:
beanFactory- reference to the declaring SpringBeanFactory.- Throws:
BeansException- See Also:
-
getBeanFactory
Returns a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.- Returns:
- a reference to the declaring Spring
BeanFactory. - See Also:
-
setBeanName
Sets thebean nameassigned to thisFactoryBeanas declared in the Spring container.- Specified by:
setBeanNamein interfaceBeanNameAware- Parameters:
name-bean nameassigned to thisFactoryBeanas declared in the Spring container.- See Also:
-
getBeanName
Returns thebean nameassigned to thisFactoryBeanas declared in the Spring container.- Returns:
- the
bean nameassigned to thisFactoryBeanas declared in the Spring container. - See Also:
-
getLogger
- Returns:
- a reference to the
Loggerused by thisFactoryBeanto logmessages. - See Also:
-
getOptionalLogger
- Returns:
- an
Optionalreference to theLoggerused by thisFactoryBeanto logmessages. - See Also:
-
OptionalLoggergetLogger()
-
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 thisFactoryBeanproduces a single bean instance.- Specified by:
isSingletonin interfaceFactoryBean<T>- Returns:
- true by default.
- See Also:
-
logDebug
-
logDebug
-
logInfo
-
logInfo
-
logWarning
-
logWarning
-
logError
-
logError
-