Class DirectRead
- java.lang.Object
-
- org.logdoc.fairhttp.service.http.statics.DirectRead
-
- All Implemented Interfaces:
Function<String,Response>,AssetsRead
public class DirectRead extends Object
- Author:
- Denis Danilin | me@loslobos.ru 04.03.2023 13:30 fair-http-server ☭ sweat and blood
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoDirListprotected booleancacheprotected booleangotIndexprotected Set<String>indexFileprotected longmaxCacheLifeprotected longmaxCacheSizeprotected StringnamedRef
-
Constructor Summary
Constructors Constructor Description DirectRead(com.typesafe.config.Config staticsCfg, String root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Responseapply(String webpath)protected voidcacheMe(String id, Response response)booleancanProcess(String webpath)protected byte[]dirList(String dirName, Collection<org.logdoc.fairhttp.service.http.statics.StaticRead.FRes> content)static ResponsefileResponse(Path p, String mimeType, long size)protected StringgetMime(String ext)protected ResponsepickCached(String id)protected StringrefreshMime(String id)protected voidrememberMime(String id, String mime)
-
-
-
Field Detail
-
autoDirList
protected final boolean autoDirList
-
gotIndex
protected final boolean gotIndex
-
cache
protected final boolean cache
-
maxCacheSize
protected final long maxCacheSize
-
maxCacheLife
protected final long maxCacheLife
-
namedRef
protected final String namedRef
-
-
Constructor Detail
-
DirectRead
public DirectRead(com.typesafe.config.Config staticsCfg, String root)
-
-
Method Detail
-
canProcess
public boolean canProcess(String webpath)
-
dirList
protected byte[] dirList(String dirName, Collection<org.logdoc.fairhttp.service.http.statics.StaticRead.FRes> content)
-
-