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 Details

  • Constructor Details

    • AbstractFactoryBeanSupport

      protected AbstractFactoryBeanSupport()
      Constructs a new instance of AbstractFactoryBeanSupport initializing a Logger to log operations performed by this FactoryBean.
      See Also:
  • Method Details

    • newLogger

      @NonNull protected org.slf4j.Logger newLogger()
      Constructs a new instance of Logger to log statements printed by Spring Data for Apache Geode.
      Returns:
      a new instance of SLF4J Logger.
      See Also:
      • LogFactory.getLog(Class)
      • Log
    • setBeanClassLoader

      public void setBeanClassLoader(@Nullable ClassLoader classLoader)
      Sets a reference to the ClassLoader used by the Spring container to load bean classes.
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
      Parameters:
      classLoader - ClassLoader used by the Spring container to load bean classes.
      See Also:
    • getBeanClassLoader

      @Nullable public ClassLoader getBeanClassLoader()
      Returns a reference to the ClassLoader used by the Spring container to load bean classes.
      Returns:
      the ClassLoader used by the Spring container to load bean classes.
      See Also:
    • setBeanFactory

      public void setBeanFactory(@Nullable org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Sets a reference to the Spring BeanFactory in which this FactoryBean was declared.
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Parameters:
      beanFactory - reference to the declaring Spring BeanFactory.
      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 Spring BeanFactory in which this FactoryBean was declared.
      Returns:
      a reference to the declaring Spring BeanFactory.
      See Also:
      • BeanFactoryAware.setBeanFactory(BeanFactory)
      • BeanFactory
    • setBeanName

      public void setBeanName(@Nullable String name)
      Sets the bean name assigned to this FactoryBean as declared in the Spring container.
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
      Parameters:
      name - bean name assigned to this FactoryBean as declared in the Spring container.
      See Also:
      • BeanNameAware.setBeanName(String)
      • String
    • getBeanName

      @Nullable public String getBeanName()
      Returns the bean name assigned to this FactoryBean as declared in the Spring container.
      Returns:
      the bean name assigned to this FactoryBean as declared in the Spring container.
      See Also:
      • BeanNameAware.setBeanName(String)
      • String
    • getLogger

      @NonNull protected org.slf4j.Logger getLogger()
      Returns a reference to the Logger used by this FactoryBean to log messages.
      Returns:
      a reference to the Logger used by this FactoryBean to log messages.
      See Also:
      • Log
    • getOptionalLogger

      protected Optional<org.slf4j.Logger> getOptionalLogger()
      Returns an Optional reference to the Logger used by this FactoryBean to log messages.
      Returns:
      an Optional reference to the Logger used by this FactoryBean to log messages.
      See Also:
    • isDebugLoggingEnabled

      public boolean isDebugLoggingEnabled()
      Determines whether DEBUG logging is enabled.
      Returns:
      a boolean value indicating whether DEBUG logging is enabled.
      See Also:
    • isInfoLoggingEnabled

      public boolean isInfoLoggingEnabled()
      Determines whether INFO logging is enabled.
      Returns:
      a boolean value indicating whether INFO logging is enabled.
      See Also:
    • isWarnLoggingEnabled

      public boolean isWarnLoggingEnabled()
      Determines whether WARN logging is enabled.
      Returns:
      a boolean value indicating whether WARN logging is enabled.
      See Also:
    • isErrorLoggingEnabled

      public boolean isErrorLoggingEnabled()
      Determines whether ERROR logging is enabled.
      Returns:
      a boolean value indicating whether ERROR logging is enabled.
      See Also:
    • isSingleton

      public boolean isSingleton()
      Indicates that this FactoryBean produces a single bean instance.
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<T>
      Returns:
      true by default.
      See Also:
      • FactoryBean.isSingleton()
    • logDebug

      protected void logDebug(String message, Object... args)
      Logs the message formatted with the array of arguments at debug level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logDebug

      protected void logDebug(Supplier<String> message)
      Logs the message supplied by the given Supplier at debug level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logInfo

      protected void logInfo(String message, Object... args)
      Logs the message formatted with the array of arguments at info level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logInfo

      protected void logInfo(Supplier<String> message)
      Logs the message supplied by the given Supplier at info level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logWarning

      protected void logWarning(String message, Object... args)
      Logs the message formatted with the array of arguments at warn level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logWarning

      protected void logWarning(Supplier<String> message)
      Logs the message supplied by the given Supplier at warn level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logError

      protected void logError(String message, Object... args)
      Logs the message formatted with the array of arguments at error level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logError

      protected void logError(Supplier<String> message)
      Logs the message supplied by the given Supplier at error level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also: