public class HttpResourceServlet extends HttpServlet
详情见: https://redkale.org
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
HttpResourceServlet.FileEntry |
protected class |
HttpResourceServlet.WatchThread |
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.util.concurrent.atomic.LongAdder |
cachedLength |
protected long |
cachelengthmax |
protected long |
cachelimit |
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,HttpResourceServlet.FileEntry> |
files |
protected boolean |
finest |
protected java.lang.String |
indexHtml |
protected java.util.concurrent.ConcurrentHashMap<java.nio.file.WatchKey,java.nio.file.Path> |
keymaps |
protected java.util.AbstractMap.SimpleEntry<java.util.regex.Pattern,java.lang.String>[] |
locationRewrites |
protected java.util.logging.Logger |
logger |
protected java.io.File |
root |
protected boolean |
watch |
protected HttpResourceServlet.WatchThread |
watchThread |
| 构造器和说明 |
|---|
HttpResourceServlet() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected HttpResourceServlet.FileEntry |
createFileEntry(java.lang.String uri) |
void |
destroy(HttpContext context,
AnyValue config) |
void |
execute(HttpRequest request,
HttpResponse response) |
void |
init(HttpContext context,
AnyValue config) |
protected static long |
parseLenth(java.lang.String value,
long defValue) |
protected final java.util.logging.Logger logger
protected final boolean finest
protected final java.util.concurrent.atomic.LongAdder cachedLength
protected long cachelimit
protected long cachelengthmax
protected boolean watch
protected java.io.File root
protected java.lang.String indexHtml
protected final java.util.concurrent.ConcurrentHashMap<java.lang.String,HttpResourceServlet.FileEntry> files
protected final java.util.concurrent.ConcurrentHashMap<java.nio.file.WatchKey,java.nio.file.Path> keymaps
protected java.util.AbstractMap.SimpleEntry<java.util.regex.Pattern,java.lang.String>[] locationRewrites
protected HttpResourceServlet.WatchThread watchThread
public void init(HttpContext context, AnyValue config)
init 在类中 Servlet<HttpContext,HttpRequest,HttpResponse>public void destroy(HttpContext context, AnyValue config)
destroy 在类中 Servlet<HttpContext,HttpRequest,HttpResponse>protected static long parseLenth(java.lang.String value,
long defValue)
public void execute(HttpRequest request, HttpResponse response) throws java.io.IOException
execute 在类中 Servlet<HttpContext,HttpRequest,HttpResponse>java.io.IOExceptionprotected HttpResourceServlet.FileEntry createFileEntry(java.lang.String uri)