Carsten Ziegeler skrev:
Daniel Fagerstrom wrote:
As discussed in:
http://marc.theaimsgroup.com/?t=113432388200001&r=1&w=2
and less radical in
http://marc.theaimsgroup.com/?t=113822674300001&r=1&w=2
There would be a lot to gain by basing our environment abstraction on
the javax.servlet.http set of interfaces in trunk. I propose that we make:
o.a.c.environment.Request extend javax.servlet.http.HttpServletRequest
o.a.c.environment.Response extend javax.servlet.http.HttpServletResponse
o.a.c.environment.Context extend javax.servlet.ServletContext
o.a.c.environment.Session extend javax.servlet.http.HttpSession
o.a.c.environment.Cookie extend javax.servlet.http.HttpCookie
This shouldn't create any compatibility problems,
Hmm, I think it will, e.g. j.s.h.HttpServletRequest#getSession returns
a j.s.h.HttpSession while o.a.c.e.Request#getSession returns a
o.a.c.e.Session and overriding just the return type is not possible in java.
Didn't think about that.
If we let o.a.c.e.Request#getSession have j.s.h.HttpSession as return
type and then let it return something that implements o.a.c.e.Session
You can always cast the return type of to a o.a.c.e.Session.
Wouldn't the need to add a few casts be a rather minor inconvenience
that is worthwhile for simplifying the framework and make it easier to
connect to the rest of the world?
/Daniel