Join GitHub today
Add BlockingHttp4sServlet #1830
Consider this PR as an initial draft. I started off by copying the
Please note that I have never worked with
This is going to be unpopular, but if we move most of this into an abstract class, and leave the
service method abstract, we could extend that with a small amount of code in both
Http4sServlet. I prefer to avoid OO, but if we're not going to do it when implementing JEE, then where?
Alternatively, we could pass an
(HttpServletRequest, HttpServletResponse) => Unit as a constructor param, but that has weird interactions with the timeout and servletIo parameters.
I think I can live with the breaking change on master, but that means we can't add it in the 0.18 series, and you probably want this now.
If we call the base class
HttpServletLike (ugh), we could introduce
BlockingHttpServlet and probably keep binary compatibility with
Http4sServlet and release it in 0.18.11.
The division looks good.