01: /*
02: * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: */
07: package javax.servlet;
08:
09: import java.io.BufferedReader;
10: import java.io.IOException;
11: import java.io.UnsupportedEncodingException;
12: import java.util.Enumeration;
13: import java.util.Locale;
14: import java.util.Map;
15:
16: /**
17: * Base request object interface definition.
18: *
19: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
20: */
21: public interface ServletRequest {
22: public Object getAttribute(String name);
23:
24: public Enumeration getAttributeNames();
25:
26: public String getCharacterEncoding();
27:
28: public int getContentLength();
29:
30: public String getContentType();
31:
32: public ServletInputStream getInputStream() throws IOException;
33:
34: public String getLocalAddr();
35:
36: public Locale getLocale();
37:
38: public Enumeration getLocales();
39:
40: public String getLocalName();
41:
42: public int getLocalPort();
43:
44: public String getParameter(String name);
45:
46: public Map getParameterMap();
47:
48: public Enumeration getParameterNames();
49:
50: public String[] getParameterValues(String name);
51:
52: public String getProtocol();
53:
54: public BufferedReader getReader() throws IOException;
55:
56: public String getRemoteAddr();
57:
58: public String getRemoteHost();
59:
60: public int getRemotePort();
61:
62: public RequestDispatcher getRequestDispatcher(String path);
63:
64: public String getScheme();
65:
66: public String getServerName();
67:
68: public int getServerPort();
69:
70: public boolean isSecure();
71:
72: public void removeAttribute(String name);
73:
74: public void setAttribute(String name, Object o);
75:
76: public void setCharacterEncoding(String enc)
77: throws UnsupportedEncodingException;
78:
79: /**
80: * @deprecated As of Version 2.1 of the Java Servlet API, use
81: * ServletContext.getRealPath(String) instead.
82: */
83: public String getRealPath(String path);
84: }
|