Class CacheControlFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.springframework.http.CacheControl>, org.springframework.beans.factory.InitializingBean

    public class CacheControlFactory
    extends org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.http.CacheControl>
    Utility class to configure a CacheControl instance
    Since:
    4.0.0
    Author:
    joseross
    • Field Summary

      • Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        logger
      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Constructor Summary

      Constructors 
      Constructor Description
      CacheControlFactory​(boolean enabled, long maxAge)  
    • Constructor Detail

      • CacheControlFactory

        @ConstructorProperties({"enabled","maxAge"})
        public CacheControlFactory​(boolean enabled,
                                   long maxAge)
    • Method Detail

      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.CacheControl>
        Specified by:
        getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.http.CacheControl>
      • createInstance

        @NonNull
        protected org.springframework.http.CacheControl createInstance()
                                                                throws Exception
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.springframework.http.CacheControl>
        Throws:
        Exception