Note that the HttpTransaction interface isn't intended to be completely general, rather it is intended to abstract the services needed in org.apache.qpid.restapi in such a way as to be neutral as to whether the Web Server is based on com.sun.net.httpserver.HttpServer or javax.servlet.http.HttpServlet.
The Server and HttpTransaction interfaces are intended to provide abstractions to enable the "business logic" to be isolated from the actual Web Server implementation choice, so for example a concrete HttpTransaction implementation could be created by wrapping a com.sun.net.httpserver.HttpExchange, but equally another implementation could wrap javax.servlet.http.HttpServletRequest and javax.servlet.http.HttpServletResponse so for example an HttpServlet could delegate to a Server instance passing the HttpTransaction it constructed from the HttpServletRequest and HttpServletResponse. @author Fraser Adams
|
|