This commit is contained in:
地平线
2015-08-21 09:47:02 +08:00
parent 38025243c0
commit cddbef5e8f

View File

@@ -70,6 +70,11 @@ public abstract class WebSocketServlet extends HttpServlet implements Nameable {
engine.close(); engine.close();
} }
@Override
public final String name() {
return this.getClass().getSimpleName().replace("Servlet", "").replace("WebSocket", "").toLowerCase();
}
@Override @Override
public final void execute(HttpRequest request, HttpResponse response) throws IOException { public final void execute(HttpRequest request, HttpResponse response) throws IOException {
final boolean debug = logger.isLoggable(Level.FINER); final boolean debug = logger.isLoggable(Level.FINER);
@@ -131,8 +136,5 @@ public abstract class WebSocketServlet extends HttpServlet implements Nameable {
}); });
} }
@Override
public abstract String name();
protected abstract WebSocket createWebSocket(); protected abstract WebSocket createWebSocket();
} }