use of com.dexels.navajo.server.listener.http.impl.BaseRequestImpl in project navajo by Dexels.
the class TmlStandardServlet method doPost.
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
final LocalClient lc = (LocalClient) getServletContext().getAttribute("localClient");
if (lc == null) {
resp.sendError(500, "No local client registered in servlet context");
return;
}
Object certObject = req.getAttribute("javax.servlet.request.X509Certificate");
String recvEncoding = req.getHeader("Content-Encoding");
String sendEncoding = req.getHeader("Accept-Encoding");
AsyncRequest request = new BaseRequestImpl(req, resp, sendEncoding, recvEncoding, certObject, "default");
TmlStandardRunner tr = new TmlStandardRunner(request, lc);
getTmlScheduler().run(tr);
// TODO broken? fix
// getTmlScheduler().run(request.instantiateRunnable());
}
use of com.dexels.navajo.server.listener.http.impl.BaseRequestImpl in project navajo by Dexels.
the class TmlRunnableBuilder method constructRequest.
private static AsyncRequest constructRequest(final HttpServletRequest req, HttpServletResponse resp, String instance) throws IOException {
Object certObject = req.getAttribute("javax.servlet.request.X509Certificate");
String contentEncoding = req.getHeader("Content-Encoding");
String acceptEncoding = req.getHeader("Accept-Encoding");
AsyncRequest request = null;
if ("POST".equals(req.getMethod())) {
request = new BaseRequestImpl(req, resp, acceptEncoding, contentEncoding, certObject, instance);
} else {
Navajo in = TmlHttpServlet.constructFromRequest(req);
request = new BaseRequestImpl(in, req, resp, instance);
}
return request;
}
Aggregations