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.http;
08:
09: import java.util.Enumeration;
10: import java.security.Principal;
11:
12: /**
13: * Interface definition for http requests.
14: *
15: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
16: */
17: public interface HttpServletRequest extends
18: javax.servlet.ServletRequest {
19: public static final String BASIC_AUTH = "BASIC";
20: public static final String CLIENT_CERT_AUTH = "CLIENT_CERT";
21: public static final String DIGEST_AUTH = "DIGEST";
22: public static final String FORM_AUTH = "FORM";
23:
24: public String getAuthType();
25:
26: public String getContextPath();
27:
28: public Cookie[] getCookies();
29:
30: public long getDateHeader(String name);
31:
32: public String getHeader(String name);
33:
34: public Enumeration getHeaderNames();
35:
36: public Enumeration getHeaders(String name);
37:
38: public int getIntHeader(String name);
39:
40: public String getMethod();
41:
42: public String getPathInfo();
43:
44: public String getPathTranslated();
45:
46: public String getQueryString();
47:
48: public String getRemoteUser();
49:
50: public String getRequestedSessionId();
51:
52: public String getRequestURI();
53:
54: public StringBuffer getRequestURL();
55:
56: public String getServletPath();
57:
58: public HttpSession getSession();
59:
60: public HttpSession getSession(boolean create);
61:
62: public Principal getUserPrincipal();
63:
64: public boolean isRequestedSessionIdFromCookie();
65:
66: public boolean isRequestedSessionIdFromURL();
67:
68: public boolean isRequestedSessionIdValid();
69:
70: public boolean isUserInRole(String role);
71:
72: /**
73: * @deprecated As of Version 2.1 of the Java Servlet API, use
74: * isRequestedSessionIdFromURL() instead.
75: */
76: public boolean isRequestedSessionIdFromUrl();
77:
78: }
|