Package io.milton.http.fs
Class ClassPathResourceFactory
java.lang.Object
io.milton.http.fs.ClassPathResourceFactory
- All Implemented Interfaces:
ResourceFactory
A resource factory which looks for resources on the classpath
- Author:
- brad
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe resource factory will only serve resources with a path which begins with this May be null Eg staticSets a constant max age for all resources served by this resource factoryModified date for all content.getResource(String host, String path) Security manager to delegate authentication and authorisation to.voidsetBasePath(String basePath) voidsetMaxAgeSeconds(Long maxAgeSeconds) voidsetModifiedDate(Date modifiedDate) voidsetSecurityManager(SecurityManager securityManager)
-
Constructor Details
-
ClassPathResourceFactory
public ClassPathResourceFactory()
-
-
Method Details
-
getResource
- Specified by:
getResourcein interfaceResourceFactory
-
getBasePath
The resource factory will only serve resources with a path which begins with this May be null Eg static -
setBasePath
-
getMaxAgeSeconds
Sets a constant max age for all resources served by this resource factory- Returns:
-
setMaxAgeSeconds
-
getModifiedDate
Modified date for all content. May be null- Returns:
-
setModifiedDate
-
getSecurityManager
Security manager to delegate authentication and authorisation to. May be null- Returns:
-
setSecurityManager
-