|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpRequest
An interface to take care of HTTP Requests. It parses headers, content, form and url parameters.
Nested Class Summary | |
---|---|
static class |
HttpRequest.Method
Request methods |
Field Summary | |
---|---|
static String |
HEADER_ACCEPT
the Accept header |
static String |
HEADER_ACCEPT_ENCODING
the Accept-Encoding header |
static String |
HEADER_ACCEPT_LANGUAGE
the Accept-Language header |
static String |
HEADER_CACHE_CONTROL
the Cache-Control header |
static String |
HEADER_CONNECTION
the Connection header |
static String |
HEADER_CONTENT_LENGTH
the Content-Length header |
static String |
HEADER_CONTENT_TYPE
the Content-Type header |
static String |
HEADER_COOKIE
the Cookie header |
static String |
HEADER_HOST
the Host header |
static String |
HEADER_SET_COOKIE
the Set-Cookie header |
static String |
HEADER_USER_AGENT
the User-Agent header |
static String |
SERVLET_CONTEXT
If the https server implementation is based on Servlets, the real ServletContext will be registered in the request attributes using this name. |
static String |
SERVLET_REQUEST
If the https server implementation is based on Servlets, the real HttpServletRequest will be registered in the request attributes using this name. |
static String |
SERVLET_RESPONSE
If the https server implementation is based on Servlets, the real HttpServletResponse will be registered in the request attributes using this name. |
Method Summary | |
---|---|
Object |
getAttribute(String name)
|
int |
getContentLength()
|
String |
getContentType()
|
String |
getHeader(String name)
Gets a header based the header name passed in. |
InputStream |
getInputStream()
|
HttpRequest.Method |
getMethod()
Gets an integer value of the request method. |
String |
getParameter(String name)
Gets a form or URL query parameter based on the name passed in. |
Map |
getParameters()
Gets all the form and URL query parameters |
String |
getRemoteAddr()
|
HttpSession |
getSession()
Returns the current session associated with this request, or if the request does not have a session, creates one. |
HttpSession |
getSession(boolean create)
Returns the current HttpSession associated with this
request or, if there is no current session and create is
true, returns a new session. |
URI |
getURI()
Gets the URI for the current URL page. |
void |
setAttribute(String name,
Object value)
|
Field Detail |
---|
static final String HEADER_ACCEPT
static final String HEADER_ACCEPT_ENCODING
static final String HEADER_ACCEPT_LANGUAGE
static final String HEADER_CONTENT_TYPE
static final String HEADER_CONTENT_LENGTH
static final String HEADER_CONNECTION
static final String HEADER_CACHE_CONTROL
static final String HEADER_HOST
static final String HEADER_USER_AGENT
static final String HEADER_SET_COOKIE
static final String HEADER_COOKIE
static final String SERVLET_REQUEST
static final String SERVLET_RESPONSE
static final String SERVLET_CONTEXT
Method Detail |
---|
String getParameter(String name)
name
- Map getParameters()
HttpSession getSession(boolean create)
HttpSession
associated with this
request or, if there is no current session and create
is
true, returns a new session.
If create
is false
and the request has no
valid HttpSession
, this method returns null
.
create
- true
to create a new session for this request
if necessary; false
to return null
if there's
no current session
HttpSession
associated with this request or
null
if create
is false
and the
request has no valid sessiongetSession()
HttpSession getSession()
HttpSession
associated with this requestgetSession(boolean)
String getHeader(String name)
name
- The name of the header to get
HttpRequest.Method getMethod()
URI getURI()
int getContentLength()
String getContentType()
InputStream getInputStream() throws IOException
IOException
Object getAttribute(String name)
void setAttribute(String name, Object value)
String getRemoteAddr()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |