public abstract class VibeServlet extends HttpServlet
HttpServletRequest and HttpServletResponse
into ServerHttpExchange. When you configure servlet, you must set
asyncSupported to true
.
ServletRegistration.Dynamic reg = context.addServlet(VibeServlet.class.getName(), new VibeServlet() {
@Override
protected Action<ServerHttpExchange> httpAction() {
return server.httpAction();
}
});
reg.setAsyncSupported(true);
reg.addMapping("/vibe");
| Constructor and Description |
|---|
VibeServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Action<ServerHttpExchange> |
httpAction()
An
Action to consume ServerHttpExchange. |
protected void |
service(HttpServletRequest req,
HttpServletResponse resp) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logprotected void service(HttpServletRequest req, HttpServletResponse resp)
service in class HttpServletprotected abstract Action<ServerHttpExchange> httpAction()
Action to consume ServerHttpExchange.Copyright 2014, The Vibe Project