public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
if (listener == null) {
throw new ServletException("RESTServiceContainer has not been set");
}
HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletConfig.getServletContext());
HttpResponse httpResponse = new ServletResponseAdapter(res);
try {
listener.onMessage(httpRequest, httpResponse);
} catch (IOException | ServletException e) {