Class ClassPathResourceFactory

java.lang.Object
io.milton.http.fs.ClassPathResourceFactory
All Implemented Interfaces:
ResourceFactory

public class ClassPathResourceFactory extends Object implements ResourceFactory
A resource factory which looks for resources on the classpath
Author:
brad
  • Constructor Details

    • ClassPathResourceFactory

      public ClassPathResourceFactory()
  • Method Details

    • getResource

      public Resource getResource(String host, String path)
      Specified by:
      getResource in interface ResourceFactory
    • getBasePath

      public String getBasePath()
      The resource factory will only serve resources with a path which begins with this May be null Eg static
    • setBasePath

      public void setBasePath(String basePath)
    • getMaxAgeSeconds

      public Long getMaxAgeSeconds()
      Sets a constant max age for all resources served by this resource factory
      Returns:
    • setMaxAgeSeconds

      public void setMaxAgeSeconds(Long maxAgeSeconds)
    • getModifiedDate

      public Date getModifiedDate()
      Modified date for all content. May be null
      Returns:
    • setModifiedDate

      public void setModifiedDate(Date modifiedDate)
    • getSecurityManager

      public SecurityManager getSecurityManager()
      Security manager to delegate authentication and authorisation to. May be null
      Returns:
    • setSecurityManager

      public void setSecurityManager(SecurityManager securityManager)