This commit is contained in:
wentch
2016-01-27 16:53:55 +08:00
parent 7768426627
commit af90cbe6e5
2 changed files with 8 additions and 1 deletions

View File

@@ -130,6 +130,9 @@ public abstract class BasedHttpServlet extends HttpServlet {
}
}
public final void postDestroy(HttpContext context, AnyValue config) {
}
public abstract boolean authenticate(int module, int actionid, HttpRequest request, HttpResponse response) throws IOException;
private HashMap<String, Entry> load() {

View File

@@ -136,7 +136,11 @@ public final class HttpPrepareServlet extends PrepareServlet<HttpContext, HttpRe
this.resourceHttpServlet.destroy(context, config);
this.servlets.stream().forEach(s -> {
s.destroy(context, s._conf);
if (s instanceof WebSocketServlet) ((WebSocketServlet) s).postDestroy(context, s._conf);
if (s instanceof WebSocketServlet) {
((WebSocketServlet) s).postDestroy(context, s._conf);
} else if (s instanceof BasedHttpServlet) {
((BasedHttpServlet) s).postDestroy(context, s._conf);
}
});
}