01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.impl.core.http;
15:
16: import org.itsnat.core.http.ItsNatHttpServlet;
17: import org.itsnat.impl.core.ItsNatServletImpl;
18: import javax.servlet.ServletRequest;
19: import javax.servlet.ServletResponse;
20: import javax.servlet.http.HttpServlet;
21: import javax.servlet.http.HttpServletRequest;
22: import javax.servlet.http.HttpServletResponse;
23: import javax.servlet.http.HttpSession;
24: import org.itsnat.impl.core.ItsNatServletContextImpl;
25: import org.itsnat.impl.core.ItsNatSessionImpl;
26:
27: /**
28: *
29: * @author jmarranz
30: */
31: public class ItsNatHttpServletImpl extends ItsNatServletImpl implements
32: ItsNatHttpServlet {
33:
34: /**
35: * Creates a new instance of ItsNatHttpServletImpl
36: */
37: public ItsNatHttpServletImpl(ItsNatImpl parent, HttpServlet servlet) {
38: super (parent, servlet);
39: }
40:
41: public HttpServlet getHttpServlet() {
42: return (HttpServlet) servlet;
43: }
44:
45: public ItsNatHttpServletRequestImpl newItsNatHttpServletRequest(
46: HttpServletRequest request) {
47: return new ItsNatHttpServletRequestImpl(this , request);
48: }
49:
50: public void processRequest(HttpServletRequest request,
51: HttpServletResponse response) {
52: ItsNatHttpServletRequestImpl itsNatReq = newItsNatHttpServletRequest(request);
53: ItsNatHttpServletResponseImpl itsNatRes = itsNatReq
54: .newItsNatHttpServletResponse(response);
55:
56: itsNatReq.process(itsNatRes);
57: }
58:
59: public void processRequest(ServletRequest request,
60: ServletResponse response) {
61: processRequest((HttpServletRequest) request,
62: (HttpServletResponse) response);
63: }
64: }
|