Class AbstractComponentAwareFactoryBean<T>

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<T>
Type Parameters:
T - The type to implement
All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<T>, InitializingBean
Direct Known Subclasses:
EvaluableScriptFactoryBean, HttpHostFactoryBean, PatternFactoryBean, UsernamePasswordCredentialsFactoryBean

public abstract class AbstractComponentAwareFactoryBean<T> extends AbstractFactoryBean<T>
A Factory bean which is aware of the component lifecycle interfaces.
  • Field Details

    • throwIfNull

      private boolean throwIfNull
      Flag controlling null behavior.
  • Constructor Details

    • AbstractComponentAwareFactoryBean

      public AbstractComponentAwareFactoryBean()
      Constructor.
  • Method Details

    • destroyInstance

      protected void destroyInstance(@Nullable T instance) throws Exception

      Call our destroy method if aposite.

      Overrides:
      destroyInstance in class AbstractFactoryBean<T>
      Throws:
      Exception
    • setThrowIfNull

      public void setThrowIfNull(boolean flag)
      Sets whether to raise an exception if a null is returned from doCreateInstance().

      Defaults to true.

      Parameters:
      flag - flag to set
      Since:
      9.1.0
    • createInstance

      @Nullable protected final T createInstance() throws Exception

      Call the parent class to create the object, then initialize it aposite.

      .
      Specified by:
      createInstance in class AbstractFactoryBean<T>
      Throws:
      Exception
    • doCreateInstance

      @Nullable protected abstract T doCreateInstance() throws Exception
      Call the parent class to create the instance.
      Returns:
      the bean
      Throws:
      Exception - if needed