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.core.http;
15:
16: import org.itsnat.core.ItsNatSession;
17: import javax.servlet.http.HttpSession;
18:
19: /**
20: * Is the ItsNat wrapper of a <code>javax.servlet.http.HttpSession</code> object.
21: *
22: * <p>The ItsNat the session concept is borrowed from the HTTP Java Servlet
23: * session concept.</p>
24: *
25: * <p>The live of an ItsNat session is the same as the wrapped <code>HttpSession</code>.</p>
26: *
27: * @author Jose Maria Arranz Santamaria
28: * @see ItsNatHttpServletRequest#getItsNatHttpSession()
29: */
30: public interface ItsNatHttpSession extends ItsNatSession {
31: /**
32: * Returns the wrapped <code>javax.servlet.http.HttpSession</code> object.
33: *
34: * @return the wrapped servlet session object.
35: */
36: public HttpSession getHttpSession();
37:
38: /**
39: * Returns the user agent that started this session.
40: *
41: * <p>This value is obtained from the first request that started this session
42: * calling <code>HttpServletRequest.getHeader(String)</code> with "User-Agent" as parameter. </p>
43: *
44: * <p>In a typical HTTP environment the user agent (a browser) does not change alongside the session.</p>
45: *
46: * @return the user agent of this session.
47: */
48: public String getUserAgent();
49: }
|