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;
15:
16: import java.util.Enumeration;
17: import javax.servlet.ServletContext;
18:
19: /**
20: * Is the ItsNat wrapper object of the standard <code>javax.servlet.ServletContext</code>.
21: *
22: * <p>There is only one instance of this interface per web application.</p>
23: *
24: * @author Jose Maria Arranz Santamaria
25: * @see ItsNatServlet#getItsNatServletContext()
26: * @see ItsNatServletConfig#getItsNatServletContext()
27: * @see ItsNatSession#getItsNatServletContext()
28: */
29: public interface ItsNatServletContext extends ItsNatUserData {
30: /**
31: * Returns the standard servlet context wrapped.
32: *
33: * @return the servlet context.
34: */
35: public ServletContext getServletContext();
36:
37: /**
38: * Returns the ItsNat "root" object used to create this object.
39: *
40: * @return the parent ItsNat object.
41: */
42: public ItsNat getItsNat();
43:
44: /**
45: * Enumerates all ItsNat sessions associated to this context.
46: *
47: * <p>The specified <code>callback</code> is called per each session.</p>
48: *
49: * @param callback the callback object to call per each session.
50: */
51: public void enumerateSessions(ItsNatSessionCallback callback);
52:
53: /**
54: * Creates a variable resolver bound to this context.
55: *
56: * @return a variable resolver bound to this context.
57: */
58: public ItsNatVariableResolver createItsNatVariableResolver();
59: }
|